[SOLVED] Debug Sendmail?
FedoraForum.org - Fedora Support Forums and Community
Results 1 to 6 of 6
  1. #1
    Join Date
    Feb 2007
    Location
    UK
    Posts
    118

    Debug Sendmail?

    Fedora 26
    Good morning,
    I have been running sendmail for ages over different versions of Fedora. I am not a mail expert, but managed to get the system working via forums such as this and googling. Typically, I was using sendmail to send me log (logwatch) reports from my laptop each day. Stupidly I hadn't checked the mail account for a couple of months and find today that mails are no longer being sent and haven't been since (from what I can gather) about the 10th Jan. I am using autrhenticated smtp - so have an auth config set under /etc/mail that again still seems to be fine and agrees with my service providers auth smtp set up.

    At first I assumed that a new config file had been downloaded and overwritten my specific changes, but that doesn't appear to be the case. Sendmail as a service is running fine. The aliases file is correct. The only thing that appears to be new are certs in /etc/..... that may have been downloaded. I have tried the openssl commands from here - https://serverfault.com/questions/13...ls-certificate -- and that seems to show the certs ok. I can't see what updates to the system have been downloaded as the logs for dnf in /var/log don't go back to Jan to check.

    If I run 'mail' or 'mailx' from the command line in verbose mode, that seems to work ok - to the effect that it seems to recognise the target address and says it's valid. So presumably logwatch is doing the same and presuming the mail is sent, but it never actually arrives.

    Does anyone know how to debug this further? How can I see the route of a sent mail and any rejects down that path?

    Thanks.....

  2. #2
    Join Date
    Oct 2010
    Location
    Canberra
    Posts
    3,016

    Re: Debug Sendmail?

    Can you clarify something - are the mail messages confined to a single machine, your local network, or do they go via an ISP ?

    User error. Please replace user and try again

  3. #3
    Join Date
    Feb 2007
    Location
    UK
    Posts
    118

    Re: Debug Sendmail?

    Ocratato,
    They go via an ISP - sendmail.mc/cf has entries for my smart.hosts.co.uk etc.
    I have found that I can send a mail via the authenticated SMTP of my isp via mail/mailx if I specify the full auth set on the command line - ie:
    mail -S smtp=my.isp.domain.ip -S smtp-auth-user=myauthuser -S smtp-auth-password=mypassword -v -r me@myauthd_domain.co.uk -s "test with direct smtp access" fred@someaddress.co.uk

    That works ok. So that seems to rule out an issue with my ISP smtp authentication and presumably the certs. That then leaves me with some form of config change my end I think, although I'm not aware of changing anything. I have just tried altering 'hostname' in case the fqdn was causing the issue (and it may have been something that I'd changed without thinking of the consequences), but that doesn't appear to have any effect.

    The mails seem to leave here ok according to maillog and get accepted for delivery via the relay (my ISP's smtp service), but nothing gets delivered. So I would guess that something in the mail header set up is causing the ISP to reject the mail as a fail, even though I'm not receiving any bounce messages back.

  4. #4
    Join Date
    Feb 2007
    Location
    UK
    Posts
    118

    Re: Debug Sendmail?

    Just tried the following:

    (Linux)E6540 :stevet : /etc/mail> sudo sendmail -Am -v -t
    From: steve@mywork.co.uk
    To: steve@myhome.co.uk
    Subject: Direct command line to sendmail

    This is the message text
    steve@myhome.co.uk... Connecting to smtp.hosts.co.uk. via relay...
    220 smtp.hosts.co.uk ESMTP
    >>> EHLO localhost.localdomain
    250-smtp.hosts.co.uk Hello localhost.localdomain [my.isp.ip.address]
    250-SIZE 157286400
    250-8BITMIME
    250-PIPELINING
    250-AUTH LOGIN PLAIN
    250-STARTTLS
    250 HELP
    >>> STARTTLS
    220 TLS go ahead
    >>> EHLO localhost.localdomain
    250-smtp.hosts.co.uk Hello localhost.localdomain [my.isp.ip.address]
    250-SIZE 157286400
    250-8BITMIME
    250-PIPELINING
    250-AUTH LOGIN PLAIN
    250 HELP
    >>> AUTH LOGIN
    334 VXNlcm5hbWU6
    >>> dHVzb2wuY28udWs=
    334 UGFzc3dvcmQ6
    >>> dHVzb2w0ODg1NDg=
    235 Authentication succeeded
    >>> MAIL From:<stevet@mywork.co.uk> SIZE=117 AUTH=stevet@localhost.localdomain
    250 OK
    >>> RCPT To:<steve@myhome.co.uk>
    >>> DATA
    250 Accepted
    354 Enter message, ending with "." on a line by itself
    >>> .
    250 OK id=1f1C0D-0008Lv-6I
    steve@myhome.co.uk... Sent (OK id=1f1C0D-0008Lv-6I)
    Closing connection to smtp.hosts.co.uk.
    >>> QUIT
    221 smtp.hosts.co.uk closing connection


    ....that to me seems to say that the message has been sent... but the message doesn't go anywhere - so it seems that sendmail is logging into the smtp authentication ok and seems to accept the message to be sent to the correct user ok. Then nothing. No mail.

  5. #5
    Join Date
    Dec 2012
    Location
    santa barbara, CA
    Posts
    956

    Re: Debug Sendmail?

    See if your ISP changed their rules to "/dev/null" everything which contains: "localhost.localdomain"
    "monsters John ... monsters from the ID..."
    "ma vule teva maar gul nol naya"

  6. #6
    Join Date
    Feb 2007
    Location
    UK
    Posts
    118

    Re: Debug Sendmail?

    I'm still waiting to hear from my ISP, but in the meanwhile I've downloaded and installed Postfix (given that sendmail appears to be deprecated anyway) and spent some time configuring that. I think I have a working system for mailing the logs again and if I don't see any issues over the next few weeks with Postfix, I will remove sendmail now anyway.

    Thanks for the help/advice anyway.

Similar Threads

  1. How to debug a program
    By JoeNapoleon in forum Programming & Packaging
    Replies: 3
    Last Post: 8th December 2011, 11:55 PM
  2. Replies: 2
    Last Post: 11th January 2009, 04:52 AM
  3. How to debug php with kdevelop?
    By gkk in forum Programming & Packaging
    Replies: 3
    Last Post: 14th June 2008, 02:13 PM
  4. how to debug yum
    By daverj in forum Using Fedora
    Replies: 5
    Last Post: 11th August 2007, 04:43 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •