# ssmtp crashes when sending emerge sync output

## padukes

Hey all,

I have a cron job which runs emerge sync once a day.  It just calls "emerge sync" so there is a bit of output.  I still have ssmtp installed (from the default) and no other MTAs.  However, I never get the email with my emerge sync output. Instead I found this in my mail.log:  

```
Jul 12 12:00:39 dhcp-1994-74 sSMTP[20935]: Buffer overflow in standardise()

Jul 12 12:05:25 dhcp-1994-74 sSMTP[20935]: Connection lost in middle of processing
```

Can anyone help me?

Thanks,

P

----------

## padukes

Does anyone have any suggestions? Is there a better service I can install? All I want to be able to do is send mail from my gentoo box through my isp's smtp server to some other email address.

Thanks,

P

----------

## devon

Are you using cron to call a script? Can you show us how you are emailing the "emerge sync" output to you?

----------

## padukes

Hey,

Here's my cron file (I'm using vcron) - it's in cron.daily:

```
dhcp-1994-74 cron.daily # more emerge.cron 

#!/bin/sh

#

# get latest emerge(s)

emerge sync

```

Here's my ssmtp.conf (I *hid* my email addy & hostname): 

```
dhcp-1994-74 ssmtp # more ssmtp.conf 

#

# /etc/ssmtp.conf -- a config file for sSMTP sendmail.

#

# The person who gets all mail for userids < 1000

#root=postmaster

root=myemail@yahoo.com

# The place where the mail goes. The actual machine name is required

# no MX records are consulted. Commonly mailhosts are named mail.domain.com

# The example will fit if you are in domain.com and your mailhub is so named.

mailhub=smtp.rcn.com

#mailhub=mail

# Example for SMTP port number 2525

# mailhub=mail.your.domain:2525

# Example for SMTP port number 25 (Standard/RFC)

# mailhub=mail.your.domain        

# Example for SSL encrypted connection

# mailhub=mail.your.domain:465

# Where will the mail seem to come from?

rewriteDomain=

# The full hostname

hostname=myhostname.rcn.com

#hostname=rcn.com

# Set this to never rewrite the "From:" line (unless not given) and to

# use that address in the "from line" of the envelope.

#FromLineOverride=YES

# Use SSL/TLS to send secure messages to server.

#UseTLS=YES

# Use SSL/TLS certificate to authenticate against smtp host.

#UseTLSCert=YES

# Use this RSA certificate.

#TLSCert=/etc/ssl/certs/ssmtp.pem
```

Does this help? Any suggestions?

P

----------

## devon

Okay. I just tried it. Here is what I did:

```
# emerge sync > emerge_sync.output

# cat emerge_sync.output | mail devon@foo.com

# send-mail: Buffer overflow in standardise()
```

So I guess ssmtp doesn't have a large enough buffer to hold all of the "emerge sync" output. What exactly are you interested in with the "emerge sync" output? Perhaps you could use sed, awk, egrep, perl, whatever to get what you want from "emerge sync" and then email that to yourself.

----------

## padukes

Thanks!

It's not really that I want the output from emerge, I'm just nervous that I will have other processes that will try to send me email and they will die silently. Do you have any ideas how to get around this? Have you tried the unstable version of ssmtp (I think it's 2.6) ? Or recommend some other very simple outbound smtp prog?

Thanks,

P

----------

## devon

 *Quote:*   

> Have you tried the unstable version of ssmtp (I think it's 2.6) ?

 

I tried the latest version of ssmtp, 2.60.1, and got the same error.   :Sad: 

 *Quote:*   

> Or recommend some other very simple outbound smtp prog?

 

I use Postfix personally, but we use Exim at work and others like Qmail.

----------

## oregonshoegazer

did anyone ever find a solution to this problem?  i'm doing something very similar and get the same result with sendmail.

i am currently using ssmtp 2.60.7

thanks.

orsg

----------

## SilverOne

Try using

```
emerge sync -q --nospinner
```

I esp. think the "nospinner" option will do the trick.

----------

