[Freeswitch-users] Sendmail segfaulting

John freeswitch at earthspike.net
Fri Jan 27 02:23:04 MSK 2012


Rob,

ssmtp sends whatever it's given:  FreeSWITCH puts the message together
(in src/switch_utils.c:switch_simple_email()) to make a fully
MIME-compliant message with the attachments read out of their files and
then pipes it into the 'sendmail' (whether ssmtp, nullmailer,
sendemail.py or whatever) program for it to send/relay it.  FreeSWITCH
waits for the 'cat | sendmail' program to return before continuing
execution and deleting files, so file deletion is unlikely to be the
issue.  Like you say, it sounds like the problem is not with
configuration but it's also very unlikely to be with file deletion. 

Can you reproduce the fault by running sendmail from the command line
with a suitably formatted mail message[*] as input?  This is pretty much
what FreeSWITCH does:

cat message.txt | <sendmail.app> -f noreply at mydomain.com <mailer-args>
recipient at mydomain.com

... with <..> from what you have in conf/autoload_configs/switch.conf.xml?

[* 'suitably formatted message' could be one of the successful ones,
view source, then edit to trim off the transport headers]

If that is successful, try to replicate your 2-message-scenario by
running two of the above commands in parallel with different input files
and see if that generates a segfault.  [If you are a linux noob as well
as a FS noob I can spell this out for you.]

John

On 26/01/12 22:04, Rob Morin wrote:
>
> John,
>
>  
>
> That's helpful, but ssmtp doesn't support attachments so it won't
> support sending the voicemail files.
>
>  
>
> Additionally, I'm somewhat stumped on the default 'sendmail' option.
> The references in the Wiki are basically all 'configuration' issues --
> stack size, etc. The problem I have is that it isn't a configuration
> issue -- sometimes it goes through, sometimes it doesn't. If it were a
> configuration issue, it would never go through (unless it was a
> resource that was near its margin).  So that's why I wanted to insert
> a delay. It appears to me that the segfault is being caused by the
> file getting moved, deleted, or still being open when sendmail
> attempts to access it.  I wish I had more to go on though.
>
>  
>
> Thank you,
>
> Rob
>
>  
>
> *From:*John [mailto:freeswitch at earthspike.net]
> *Sent:* Thursday, January 26, 2012 1:49 PM
> *To:* freeswitch-users at lists.freeswitch.org
> *Subject:* Re: [Freeswitch-users] Sendmail segfaulting
>
>  
>
> Slightly unrelated, but I have been using the python script
> sendemail.py until recently when a user noticed that they were not
> being emailed some voicemails.  I have since changed to using ssmtp
> (rather than nullmailer as my mail server requires a login, TLS on
> tcp/587). One thing I noticed, and it may be me that caused it, but
> the sendemail.py script had some indentation using (4) spaces and some
> using tabs.  But the main problem is that the script keeps warning
> about the MimeWriter class being deprecated and has no error reporting
> or recovery, it seems.  For me, it was easier to install ssmtp than
> rewrite the python script.  If you don't need a full mail server, I
> would recommend using a null mailer like ssmtp or nullmailer.
>
> John
>
> On 26/01/12 15:13, Rob Morin wrote:
>
> I tried to modify the eximcompat.sh script to work with sendmail. I'm
> not sure why it didn't work. It might be that, for starters, I don't
> have exim installed, I have sendmail.
>
>  
>
> I haven't tried the python script.  Is that the one you use?
>
>  
>
> Rob
>
>  
>
> *From:*Michael Jerris [mailto:mike at jerris.com]
> *Sent:* Thursday, January 26, 2012 8:09 AM
> *To:* FreeSWITCH Users Help
> *Subject:* Re: [Freeswitch-users] Sendmail segfaulting
>
>  
>
> delay won't help you.  Why didn't the script work?  I know we do this
> and it works fine.  Pretty sure we use a modified version of the
> sample in tree.
>
>  
>
> Mike
>
>  
>
> On Jan 25, 2012, at 10:43 PM, Rob Morin wrote:
>
>
>
>
> I saw that, and tried everything I could. Still no luck.
>
>  
>
> My stack limit is 8192, so that shouldn't be the issue.  I'm running
> CentOS x_64.
>
>  
>
> I tried creating a script as the wiki suggests, so that I could make
> changes without having to restart FS. But that didn't work either (I'm
> still a noob). My goal was to add a sleep delay, in the case that FS
> is calling the sendmail command before it's completely written and
> released the email it's sending. Any idea how to make that work?
>
> Thank you,
>
> Rob
>
>  
>
> *From:* Michael Jerris [mailto:mike at jerris.com]
> <mailto:[mailto:mike at jerris.com]> 
> *Sent:* Wednesday, January 25, 2012 1:57 PM
> *To:* FreeSWITCH Users Help
> *Subject:* Re: [Freeswitch-users] Sendmail segfaulting before second
> message is sent
>
>  
>
> http://wiki.freeswitch.org/wiki/Mod_voicemail#Exim4_settings
>
>  
>
> On Jan 25, 2012, at 1:31 PM, Rob Morin wrote:
>
>
>
>
>
> For some extensions, I've got FreeSWITCH configured to send both the
> voicemail to an email address and a notification to a cell phone that
> there is a message.
>
>  
>
> Sendmail is segfaulting (error 6) before the second email message is
> sent. Sometimes the notification message is going out, sometimes the
> email message goes.
>
>  
>
> If I am just sending an email, it is **generally** successful.
> Although sometimes it fails, so I really need to fix this.
>
>  
>
> Does anyone have any suggestions as to how I can troubleshoot this? 
>
> (Running CentOS 5.7, sendmail 8.13).
>
>  
>
>
>
>
> _________________________________________________________________________
> Professional FreeSWITCH Consulting Services:
> consulting at freeswitch.org <mailto:consulting at freeswitch.org>
> http://www.freeswitchsolutions.com
>  
> 
> 
>  
> Official FreeSWITCH Sites
> http://www.freeswitch.org
> http://wiki.freeswitch.org
> http://www.cluecon.com
>  
> FreeSWITCH-users mailing list
> FreeSWITCH-users at lists.freeswitch.org <mailto:FreeSWITCH-users at lists.freeswitch.org>
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> http://www.freeswitch.org
>
>  
>
>
>
> _________________________________________________________________________
> Professional FreeSWITCH Consulting Services:
> consulting at freeswitch.org
> http://www.freeswitchsolutions.com
>
> 
> 
>
> Official FreeSWITCH Sites
> http://www.freeswitch.org
> http://wiki.freeswitch.org
> http://www.cluecon.com
>
> FreeSWITCH-users mailing list
> FreeSWITCH-users at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> http://www.freeswitch.org

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20120126/f502a6a3/attachment-0001.html 


Join us at ClueCon 2011 Aug 9-11, 2011
More information about the FreeSWITCH-users mailing list