Forum Discussion

Demeter_Luo_168's avatar
Demeter_Luo_168
Icon for Nimbostratus rankNimbostratus
Aug 21, 2016

err sSMTP

Hi friends,

 

err sSMTP:Unable to locate mail

 

err sSMTP:Cannot open mail:25

 

there are massive err sSMTP log on bigip,who can tell me what do these err logs mean?why generate these err logs?and how to estimate these err los?

 

i am sure that there is no email alert configurated.

 

7 Replies

  • which log file is that exactly?

     

    what is the exact log entry?

     

    which modules are you using?

     

    which version?

     

  • Something is trying to send mail, and by default ssmtp (simple smtp) does this by trying to connect to "mail" (through DNS resolution) on port 25 (defined in /etc/ssmtp/ssmtp.conf as 'mailhub')

     

    From version 11.5.0 and later, this file is not directly editable, and must be modified using tmsh commands.

     

    Refer to SOL13180 for information about how to configure that.

     

    If that doesn't solve or explain your problem, I recommend opening a support ticket so that F5 can take a look at your configuration.

     

  • i noticed i have these also, can't remember i had them with version 11.5.4, but with 12.1.1 i certainly do:

    Sep 11 16:00:01 bigip-01 err sSMTP[2451]: Unable to locate mail
    Sep 11 16:00:01 bigip-01 err sSMTP[2451]: Cannot open mail:25
    Sep 11 16:05:01 bigip-01 err sSMTP[3056]: Unable to locate mail
    Sep 11 16:05:01 bigip-01 err sSMTP[3056]: Cannot open mail:25
    Sep 11 16:10:02 bigip-01 err sSMTP[3328]: Unable to locate mail
    Sep 11 16:10:02 bigip-01 err sSMTP[3328]: Cannot open mail:25
    

    can't really remember i ever configured email for something, anyone have a clue where to start looking?

  • It looks like we made some changes in 12.0.0 which result in some scripts that cron runs generating output, and this output by default gets sent to root, which is aliased to postmaster, which is delivered to the value of mailhub (default is 'mail').

     

    I'm currently seeing this on a 12.1.1 system in my lab. Let me look into which scripts are doing it, and see what can be done to suppress the messages.

     

  • After working with F5 Support, SOL13180 worked for us. We are running 12.1.0 HF1.

     

    Log into the F5 CLI and run the commands:

     

    tmsh

     

    modify /sys outbound-smtp mailhub [mail_server]:[port]

     

    save /sys config

     

    quit

     

    Now test:

     

    echo "ssmtp test mail" | mail -vs "Test email for SOL13180" [your_email_address]

     

    Interestingly, this change resulted in our F5s sending non-deliverable emails to our SMTP server. We had to implement the workaround indicated in BUG ID 467589 of the 11.5.2 release notes.

     

    Again, from the F5 CLI:

     

    Remount the /usr partition as read-write:

     

    mount -o remount -rw /usr

     

    Edit the /usr/share/mysql/purge_mysql_logs.pl file and change this original line (line 27):

     

    unless( $provisioned_am || $provisioned_asm || $provisioned_psm ) {

     

    to this:

     

    unless( ​​$provisioned_am == 1 || $provisioned_asm == 1 || $provisioned_psm == 1 ) {

     

    Save the file, and remount /usr as read-only:

     

    mount -o remount -r /usr

     

    • boneyard's avatar
      boneyard
      Icon for MVP rankMVP

      I tried the second part of the work around (needed to change line 19 and not 27) on my test box (12.1.0 HF1) and it had no effect. still getting the messages.

       

      for a customer environment I opened a case and will report back with results.

       

  • Ok, my information based on the support ticket. there is one issue that currently if the big-ip wants to send mail and no mail server is configured it uses the default "mail" hostname. there is a bug ID564522 without a fix currently.

     

    of course it doesn't send these emails by accident, if these happen regularly (every minute, 5 minutes, hour) there must be something wrong in the automatically triggered scripts (usually by the cron daemon). the one for my test system i haven't found but for another system is was the issue described here:

     

    https://devcentral.f5.com/questions/just-upgraded-to-121-and-getting-many-cron-emails-47141

     

    that is for bug ID ID578036

     

    for me what modifying /etc/cron.usbflush was not enough, also had to change the root crontab itself. please be careful with workarounds like this if you are not that familiar with linux.