Postfix root mails send to a wrong address

Discussion in 'Installation/Configuration' started by JPFOL, Dec 31, 2021.

  1. JPFOL

    JPFOL New Member

    Hello,

    I have from time to time emails sent out by root, but routed to wrong email adresss.
    example : "[email protected]" in spite of "[email protected]"
    Any advise on how/where to find/catch what setup/config went wrong ?

    Thanks
    JP FOL
     
  2. Jesse Norell

    Jesse Norell Well-Known Member Staff Member Howtoforge Staff

    Check mail logs to see when it is sent and where it was sent from for clues. You could setup the doma.com domain (or otherwise configure postfix to deliver the mail) so you receive the email and can examine the contents.
     
  3. JPFOL

    JPFOL New Member

    Thanks,
    I did found the entry below in mail.log, but I cannot identify from what process it is coming from ?
    How to identify what parameters is setup in a wrong maner ?
    Here is the log. No details about the mail no subjet ...Than I receive alerts from mailjet my smtp relay.

    Dec 30 07:42:09 vps-60417 postfix/pickup[1265]: F3F2A43205: uid=0 from=<root>
    Dec 30 07:42:09 vps-60417 postfix/cleanup[4919]: F3F2A43205: message-id=<[email protected]>
    Dec 30 07:42:10 vps-60417 postfix/qmgr[971]: F3F2A43205: from=<[email protected]>, size=787, nrcpt=1 (queue active)
    Dec 30 07:42:10 vps-60417 postfix/pickup[1265]: 159C9431F9: uid=0 from=<root>
    Dec 30 07:42:10 vps-60417 postfix/cleanup[4919]: 159C9431F9: message-id=<[email protected]>
    Dec 30 07:42:10 vps-60417 postfix/qmgr[971]: 159C9431F9: from=<[email protected]>, size=776, nrcpt=1 (queue active)
    Dec 30 07:42:10 vps-60417 postfix/smtp[5125]: F3F2A43205: to=<[email protected]>, relay=in-v3.mailjet.com[1...]:587, delay=1.7, delays=1.1/0.07/0.41/0.07, dsn=2.0.0, status=sent (250 OK queued as b1ca5cee-be20-4367-b3ae-5fd95f0f2c73)
    Dec 30 07:42:10 vps-60417 postfix/qmgr[971]: F3F2A43205: removed
    Dec 30 07:42:10 vps-60417 postfix/smtp[5127]: 159C9431F9: to=<[email protected]>, relay=in-v3.mailjet.com[...]:587, delay=1.7, delays=1.1/0.05/0.44/0.07, dsn=2.0.0, status=sent (250 OK queued as 26e3bc4d-20c7-4f96-ae9b-80e8f06514b5)
    Dec 30 07:42:10 vps-60417 postfix/qmgr[971]: 159C9431F9: removed
     
  4. JPFOL

    JPFOL New Member

    Hello I think I finally did solve it.
    Issue was probably in the Cron email to root even if I could not identify were was the wrong setup.
    I did :
    - add root: [email protected] to file /etc/aliases
    - run command: newaliases
    - Restart Postfix: service postfix restart
    - run the test command:echo test | mail -s "test message" root
    [email protected] emails are now forwarded correctly to external management email.

    By the way I found another issue in ispconfig/acme.log, an obsolete domain which have been removed in ispconfig, was still present in /root/.acme.sh leading to recurent daily cron errors in updating letsencrypt ssl certificates.

    Maybe 2 corective features proposal for future IspConfig upgrade version.

    Thanks for support and Happy new 2022 year to everybody.

    JP FOL
     
    till likes this.

Share This Page