Postfix can't send mail Ubuntu

February 24, 2016 4.2k views
LAMP Stack Linux Basics Ubuntu

Hi,

I am having one heck of a time setting up basic email service with this server.

Currently using postfix.

Emails stay in queue forever, and if I force them I get

Forcing the attempted delivery of mail with the command postqueue -c /etc/postfix -f ..

postqueue: warning: unable to look up public/qmgr: No such file or directory
postqueue: fatal: Cannot flush mail queue - mail system is down

Turned off the ufw firewall for this testing so I know it's not the firewall.

Thanks

18 comments
  • Which DO tutorial are you using to set up postfix?

  • @yorkdigitalsolutions - You're using one of the simpler tutorials, which means you probably need to mainly examine /var/log/mail.log to look for errors. Try sending mail again then look at the bottom of that log file. Post those errors with the appropriate edits for any sensitive info.

  • Yes post logs. First of all make sure that the postfix service is actually running :)
    Also maybe check file ownership of the postfix files. You can run the command 'postfix check' to see if there are any errors there as well.

    here's the man page. http://www.postfix.org/postfix.1.html

  • here is the log for the test email today

    Feb 24 00:00:59 yorkdigitalsolutions postfix/postdrop[19626]: warning: unable to look up public/pickup: No such file or directory
    Feb 24 04:00:01 yorkdigitalsolutions postfix/postdrop[21094]: warning: unable to look up public/pickup: No such file or directory
    Feb 24 07:02:36 yorkdigitalsolutions postfix/postdrop[22452]: warning: unable to look up public/pickup: No such file or directory
    Feb 24 22:26:31 yorkdigitalsolutions postfix/postqueue[28276]: warning: Mail system is down -- accessing queue directly
    Feb 24 22:26:32 yorkdigitalsolutions postfix/postqueue[28283]: warning: Mail system is down -- accessing queue directly
    Feb 24 22:26:44 yorkdigitalsolutions postfix/postqueue[28293]: warning: Mail system is down -- accessing queue directly
    Feb 24 22:27:03 yorkdigitalsolutions postfix/postqueue[28302]: warning: Mail system is down -- accessing queue directly
    Feb 24 22:38:10 yorkdigitalsolutions postfix/postdrop[3242]: warning: unable to look up public/pickup: No such file or directory

  • Postfix check returns the following

    postfix/postfix-script: warning: /var/spool/postfix/etc/ssl/certs/ca-certificates.crt and /etc/ssl/certs/ca-certificates.crt differ

  • @yorkdigitalsolutions - The executables like qmgr and pickup should be in the postfix daemon directory. This is normally /usr/lib/postfix, but since postfix can't find it, let's see were it was configured to be:

    postconf daemon_directory
    # might as well look at the config directory also
    postconf config_directory
    
  • daemondirectory = /usr/lib/postfix
    config
    directory = /etc/postfix

  • @yorkdigitalsolutions - failed install, clash with another installation, or X factor are the possibilities. Narrow the possibilities by verifying the installation:

    dpkg --status postfix | grep ^Status
    # should show "Status: install ok installed"
    
    dpkg --verify postfix
    # should return nothing
    
  • Status: install ok installed

    verify postfix returned nothing

    /etc/postfix/main.cf is as follows

    See /usr/share/postfix/main.cf.dist for a commented, more complete version Debian specific: Specifying a file name will cause the first line of that file to be used as the name. The Debian default is /etc/mailname. myorigin = /etc/mailname

    smtpdbanner = $myhostname ESMTP $mailname (Ubuntu)
    biff = no

    appending .domain is the MUA's job.

    appenddotmydomain = no

    Uncomment the next line to generate "delayed mail" warnings delaywarningtime = 4h

    readme_directory = /usr/share/doc/postfix

    TLS parameters

    smtpdtlscertfile=/etc/ssl/certs/ssl-cert-snakeoil.pem
    smtpd
    tlskeyfile=/etc/ssl/private/ssl-cert-snakeoil.key
    smtpdusetls=yes
    smtpdtlssessioncachedatabase = btree:${datadirectory}/smtpdscache
    smtptlssessioncachedatabase = btree:${datadirectory}/smtpscache

    See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for information on enabling SSL in the smtp client.

    smtpdrelayrestrictions = permitmynetworks permitsaslauthenticated deferunauthdestination
    myhostname = yorkdigitalsolutions.com
    alias
    maps = hash:/etc/aliases
    aliasdatabase = hash:/etc/aliases
    myorigin = /etc/mailname
    mydestination = mail.ydsinc.ca, yorkdigitalsolutions.com, localhost.com, localhost
    relayhost =
    mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
    mailbox
    command = procmail -a "$EXTENSION"
    mailboxsizelimit = 0
    recipientdelimiter = +
    inet
    interfaces = loopback-only
    inetprotocols = all
    html
    directory = /usr/share/doc/postfix/html

  • @yorkdigitalsolutions - Your postfix daemon probably died, as @ethandrower mentioned.

    # check postfix daemon a few ways
    postfix status
    service postfix status
    ps -ef | grep "postfix/master"
    
    # restart postfix
    service postfix start
    
    # then check status after a delay
    sleep 15
    postfix status
    service postfix status
    ps -ef | grep "postfix/master"
    
  • Postfix status returns "postfix/postfix-script: the Postfix mail system is not running"

    service postfix status returns " * postfix is not running"

    ps -ef | grep "postfix/master" returns "admin 26457 26078 0 09:17 pts/0 00:00:00 grep --color=auto postfix/master

    Restarted postfix returns " * Starting Postfix Mail Transport Agent postfix [ OK ] "

    check status after delay

    postfix/postfix-script: the Postfix mail system is not running
    root@yorkdigitalsolutions:/home/admin# service postfix status

    • postfix is not running root@yorkdigitalsolutions:/home/admin# ps -ef | grep "postfix/master" root 26615 26581 0 09:20 pts/0 00:00:00 grep --color=auto postfix/master
  • @yorkdigitalsolutions - In the file /var/log/mail.log, look for the string "daemon started" and print out the lines that follow.

  • I dont see where it says daemon started.

    Here is today's entries

    Feb 25 00:01:06 yorkdigitalsolutions postfix/postdrop[22870]: warning: unable to look up public/pickup: No such file or directory
    Feb 25 04:00:01 yorkdigitalsolutions postfix/postdrop[24227]: warning: unable to look up public/pickup: No such file or directory
    Feb 25 07:00:36 yorkdigitalsolutions postfix/postdrop[25533]: warning: unable to look up public/pickup: No such file or directory
    Feb 25 09:16:29 yorkdigitalsolutions postfix/postfix-script[26435]: the Postfix mail system is not running
    Feb 25 09:18:19 yorkdigitalsolutions postfix/master[26560]: fatal: bind 127.0.0.1 port 25: Address already in use
    Feb 25 09:19:08 yorkdigitalsolutions postfix[26564]: error: to submit mail, use the Postfix sendmail command
    Feb 25 09:19:08 yorkdigitalsolutions postfix[26564]: fatal: the postfix command is reserved for the superuser
    Feb 25 09:20:03 yorkdigitalsolutions postfix/postfix-script[26598]: the Postfix mail system is not running

  • @yorkdigitalsolutions - Welp, that leaves /var/log/mail.err or /var/log/syslog to figure out why postfix/master died. If nothing stands out there, time to send the bat signal to support and point them to this thread.

  • /var/log/mail.err

    eb 22 21:53:38 LAMP sendmail[10107]: My unqualified host name (LAMP) unknown; sleeping for retry
    Feb 22 21:54:38 LAMP sendmail[10107]: unable to qualify my own domain name (LAMP) -- using short name
    Feb 22 21:54:38 LAMP sm-mta[10171]: My unqualified host name (LAMP) unknown; sleeping for retry
    Feb 22 21:54:40 LAMP sm-msp-queue[10176]: My unqualified host name (LAMP) unknown; sleeping for retry
    Feb 22 21:55:38 LAMP sm-mta[10171]: unable to qualify my own domain name (LAMP) -- using short name
    Feb 22 21:55:40 LAMP sm-msp-queue[10176]: unable to qualify my own domain name (LAMP) -- using short name
    Feb 22 21:55:53 LAMP sendmail[10222]: My unqualified host name (LAMP) unknown; sleeping for retry
    Feb 22 21:56:53 LAMP sendmail[10222]: unable to qualify my own domain name (LAMP) -- using short name
    Feb 22 21:57:49 LAMP postfix/master[11452]: fatal: bind 0.0.0.0 port 25: Address already in use
    Feb 23 19:35:18 LAMP postfix/postqueue[7960]: fatal: Cannot flush mail queue - mail system is down
    Feb 23 19:56:04 yorkdigitalsolutions postfix/master[16315]: fatal: bind 0.0.0.0 port 25: Address already in use
    Feb 23 20:00:17 yorkdigitalsolutions postfix/postqueue[17110]: fatal: Cannot flush mail queue - mail system is down
    Feb 23 20:05:21 yorkdigitalsolutions postfix/postqueue[17149]: fatal: Cannot flush mail queue - mail system is down
    Feb 23 20:22:20 yorkdigitalsolutions postfix/master[31081]: fatal: bind 127.0.0.1 port 25: Address already in use
    Feb 23 20:24:51 yorkdigitalsolutions postfix/postqueue[31142]: fatal: Cannot flush mail queue - mail system is down
    Feb 25 09:18:19 yorkdigitalsolutions postfix/master[26560]: fatal: bind 127.0.0.1 port 25: Address already in use
    Feb 25 09:19:08 yorkdigitalsolutions postfix[26564]: error: to submit mail, use the Postfix sendmail command
    Feb 25 09:19:08 yorkdigitalsolutions postfix[26564]: fatal: the postfix command is reserved for the superuser

    /var/log/syslog

    Feb 25 07:00:36 yorkdigitalsolutions postfix/postdrop[25533]: warning: unable to look up public/pickup: No such file or directory
    Feb 25 07:04:13 yorkdigitalsolutions kernel: [127637.560759] [UFW BLOCK] IN=eth0 OUT= MAC=04:01:7b:d6:9d:01:30:7c:5e:93:14:70:08:00 SRC=52.13.31.205 DST=159.203.3.34 LEN=40 TOS=0x08 PREC=0x00 TTL=228 ID=$
    Feb 25 07:05:34 yorkdigitalsolutions kernel: [127718.449038] [UFW BLOCK] IN=eth0 OUT= MAC=04:01:7b:d6:9d:01:30:7c:5e:93:14:70:08:00 SRC=183.60.48.25 DST=159.203.3.34 LEN=40 TOS=0x08 PREC=0x20 TTL=44 ID=0$
    Feb 25 07:09:01 yorkdigitalsolutions CRON[25586]: (root) CMD ( [ -x /usr/lib/php5/maxlifetime ] && [ -x /usr/lib/php5/sessionclean ] && [ -d /var/lib/php5 ] && /usr/lib/php5/sessionclean /var/lib/php5 $$
    Feb 25 07:17:01 yorkdigitalsolutions CRON[25624]: (root) CMD ( cd / && run-parts --report /etc/cron.hourly)
    Feb 25 07:22:49 yorkdigitalsolutions kernel: [128753.640093] [UFW BLOCK] IN=eth0 OUT= MAC=04:01:7b:d6:9d:01:30:7c:5e:91:94:30:08:00 SRC=176.106.31.202 DST=159.203.3.34 LEN=29 TOS=0x00 PREC=0x00 TTL=52 ID$
    Feb 25 07:22:52 yorkdigitalsolutions kernel: [128756.266544] [UFW BLOCK] IN=eth0 OUT= MAC=04:01:7b:d6:9d:01:30:7c:5e:91:94:30:08:00 SRC=176.106.31.202 DST=159.203.3.34 LEN=29 TOS=0x00 PREC=0x00 TTL=52 ID$
    Feb 25 07:22:53 yorkdigitalsolutions kernel: [128758.027297] [UFW BLOCK] IN=eth0 OUT= MAC=04:01:7b:d6:9d:01:30:7c:5e:91:94:30:08:00 SRC=176.106.31.202 DST=159.203.3.34 LEN=29 TOS=0x00 PREC=0x00 TTL=52 ID$
    Feb 25 07:24:07 yorkdigitalsolutions kernel: [128831.562814] [UFW BLOCK] IN=eth0 OUT= MAC=04:01:7b:d6:9d:01:30:7c:5e:91:94:30:08:00 SRC=104.243.223.8 DST=159.203.3.34 LEN=433 TOS=0x08 PREC=0x20 TTL=53 ID$
    Feb 25 07:26:24 yorkdigitalsolutions kernel: [128968.627068] [UFW BLOCK] IN=eth0 OUT= MAC=04:01:7b:d6:9d:01:30:7c:5e:91:94:30:08:00 SRC=85.214.18.252 DST=159.203.3.34 LEN=60 TOS=0x00 PREC=0x00 TTL=55 ID=$
    Feb 25 07:26:25 yorkdigitalsolutions kernel: [128969.626733] [UFW BLOCK] IN=eth0 OUT= MAC=04:01:7b:d6:9d:01:30:7c:5e:91:94:30:08:00 SRC=85.214.18.252 DST=159.203.3.34 LEN=60 TOS=0x00 PREC=0x00 TTL=55 ID=$
    Feb 25 07:26:27 yorkdigitalsolutions kernel: [128971.626756] [UFW BLOCK] IN=eth0 OUT= MAC=04:01:7b:d6:9d:01:30:7c:5e:91:94:30:08:00 SRC=85.214.18.252 DST=159.203.3.34 LEN=60 TOS=0x00 PREC=0x00 TTL=55 ID=$
    Feb 25 07:26:31 yorkdigitalsolutions kernel: [128975.626862] [UFW BLOCK] IN=eth0 OUT= MAC=04:01:7b:d6:9d:01:30:7c:5e:91:94:30:08:00 SRC=85.214.18.252 DST=159.203.3.34 LEN=60 TOS=0x00 PREC=0x00 TTL=55 ID=$
    Feb 25 07:28:45 yorkdigitalsolutions kernel: [129109.585148] [UFW BLOCK] IN=eth0 OUT= MAC=04:01:7b:d6:9d:01:30:7c:5e:91:94:30:08:00 SRC=202.196.113.50 DST=159.203.3.34 LEN=40 TOS=0x08 PREC=0x20 TTL=96 ID$
    Feb 25 07:29:32 yorkdigitalsolutions kernel: [129156.356652] [UFW BLOCK] IN=eth0 OUT= MAC=04:01:7b:d6:9d:01:30:7c:5e:91:94:30:08:00 SRC=27.194.204.235 DST=159.203.3.34 LEN=60 TOS=0x00 PREC=0x00 TTL=52 ID$
    Feb 25 07:29:35 yorkdigitalsolutions kernel: [129159.352826] [UFW BLOCK] IN=eth0 OUT= MAC=04:01:7b:d6:9d:01:30:7c:5e:91:94:30:08:00 SRC=27.194.204.235 DST=159.203.3.34 LEN=60 TOS=0x00 PREC=0x00 TTL=52 ID$
    Feb 25 07:29:41 yorkdigitalsolutions kernel: [129165.352651] [UFW BLOCK] IN=eth0 OUT= MAC=04:01:7b:d6:9d:01:30:7c:5e:91:94:30:08:00 SRC=27.194.204.235 DST=159.203.3.34 LEN=60 TOS=0x00 PREC=0x00 TTL=52 ID$
    Feb 25 07:31:50 yorkdigitalsolutions kernel: [129294.359626] [UFW BLOCK] IN=eth0 OUT= MAC=04:01:7b:d6:9d:01:30:7c:5e:91:94:30:08:00 SRC=38.124.171.164 DST=159.203.3.34 LEN=60 TOS=0x08 PREC=0x40 TTL=51 ID$
    Feb 25 07:31:53 yorkdigitalsolutions kernel: [129297.361315] [UFW BLOCK] IN=eth0 OUT= MAC=04:01:7b:d6:9d:01:30:7c:5e:91:94:30:08:00 SRC=38.124.171.164 DST=159.203.3.34 LEN=60 TOS=0x08 PREC=0x40 TTL=51 ID$
    Feb 25 07:38:43 yorkdigitalsolutions kernel: [129707.946414] [UFW BLOCK] IN=eth0 OUT= MAC=04:01:7b:d6:9d:01:30:7c:5e:91:94:30:08:00 SRC=183.60.48.25 DST=159.203.3.34 LEN=40 TOS=0x08 PREC=0x20 TTL=44 ID=0$
    Feb 25 07:39:01 yorkdigitalsolutions CRON[25761]: (root) CMD ( [ -x /usr/lib/php5/maxlifetime ] && [ -x /usr/lib/php5/sessionclean ] && [ -d /var/lib/php5 ] && /usr/lib/php5/sessionclean /var/lib/php5 $$
    Feb 25 07:41:28 yorkdigitalsolutions kernel: [129872.067492] [UFW BLOCK] IN=eth0 OUT= MAC=04:01:7b:d6:9d:01:30:7c:5e:91:94:30:08:00 SRC=52.62.52.80 DST=159.203.3.34 LEN=60 TOS=0x08 PREC=0x40 TTL=44 ID=43$
    Feb 25 07:41:28 yorkdigitalsolutions kernel: [129873.006119] [UFW BLOCK] IN=eth0 OUT= MAC=04:01:7b:d6:9d:01:30:7c:5e:91:94:30:08:00 SRC=52.62.52.80 DST=159.203.3.34 LEN=60 TOS=0x08 PREC=0x40 TTL=44 ID=43$
    Feb 25 07:41:30 yorkdigitalsolutions kernel: [129874.997489] [UFW BLOCK] IN=eth0 OUT= MAC=04:01:7b:d6:9d:01:30:7c:5e:91:94:30:08:00 SRC=52.62.52.80 DST=159.203.3.34 LEN=60 TOS=0x08 PREC=0x40 TTL=44 ID=43$
    Feb 25 07:43:16 yorkdigitalsolutions kernel: [129980.059485] [UFW BLOCK] IN=eth0 OUT= MAC=04:01:7b:d6:9d:01:30:7c:5e:91:94:30:08:00 SRC=37.21.103.56 DST=159.203.3.34 LEN=60 TOS=0x00 PREC=0x00 TTL=54 ID=4$
    Feb 25 07:43:34 yorkdigitalsolutions kernel: [129998.232335] [UFW BLOCK] IN=eth0 OUT= MAC=04:01:7b:d6:9d:01:30:7c:5e:93:14:70:08:00 SRC=185.130.5.224 DST=159.203.3.34 LEN=44 TOS=0x08 PREC=0x20 TTL=244 ID$
    Feb 25 07:44:15 yorkdigitalsolutions kernel: [130039.724005] [UFW BLOCK] IN=eth0 OUT= MAC=04:01:7b:d6:9d:01:30:7c:5e:91:94:30:08:00 SRC=46.246.29.194 DST=159.203.3.34 LEN=60 TOS=0x00 PREC=0x00 TTL=52 ID=$
    Feb 25 07:44:18 yorkdigitalsolutions kernel: [130042.722163] [UFW BLOCK] IN=eth0 OUT= MAC=04:01:7b:d6:9d:01:30:7c:5e:91:94:30:08:00 SRC=46.246.29.194 DST=159.203.3.34 LEN=60 TOS=0x00 PREC=0x00 TTL=52 ID=$
    Feb 25 07:44:24 yorkdigitalsolutions kernel: [130048.721993] [UFW BLOCK] IN=eth0 OUT= MAC=04:01:7b:d6:9d:01:30:7c:5e:91:94:30:08:00 SRC=46.246.29.194 DST=159.203.3.34 LEN=60 TOS=0x00 PREC=0x00 TTL=52 ID=$
    Feb 25 07:46:35 yorkdigitalsolutions kernel: [130179.140217] [UFW BLOCK] IN=eth0 OUT= MAC=04:01:7b:d6:9d:01:30:7c:5e:91:94:30:08:00 SRC=169.54.244.84 DST=159.203.3.34 LEN=40 TOS=0x00 PREC=0x00 TTL=247 ID$
    Feb 25 07:48:03 yorkdigitalsolutions kernel: [130267.127913] [UFW BLOCK] IN=eth0 OUT= MAC=04:01:7b:d6:9d:01:30:7c:5e:91:94:30:08:00 SRC=82.79.67.36 DST=159.203.3.34 LEN=60 TOS=0x00 PREC=0x00 TTL=52 ID=65$
    Feb 25 07:48:06 yorkdigitalsolutions kernel: [130270.119518] [UFW BLOCK] IN=eth0 OUT= MAC=04:01:7b:d6:9d:01:30:7c:5e:91:94:30:08:00 SRC=82.79.67.36 DST=159.203.3.34 LEN=60 TOS=0x00 PREC=0x00 TTL=52 ID=65$
    Feb 25 07:50:54 yorkdigitalsolutions kernel: [130438.214106] [UFW BLOCK] IN=eth0 OUT= MAC=04:01:7b:d6:9d:01:30:7c:5e:91:94:30:08:00 SRC=185.130.5.224 DST=159.203.3.34 LEN=272 TOS=0x08 PREC=0x20 TTL=244 I$
    Feb 25 08:02:49 yorkdigitalsolutions kernel: [131153.731814] [UFW BLOCK] IN=eth0 OUT= MAC=04:01:7b:d6:9d:01:30:7c:5e:91:94:30:08:00 SRC=104.255.65.207 DST=159.203.3.34 LEN=40 TOS=0x08 PREC=0x20 TTL=244 I$
    Feb 25 08:08:43 yorkdigitalsolutions kernel: [131507.475242] [UFW BLOCK] IN=eth0 OUT= MAC=04:01:7b:d6:9d:01:30:7c:5e:91:94:30:08:00 SRC=189.203.240.181 DST=159.203.3.34 LEN=48 TOS=0x00 PREC=0x00 TTL=112 $
    Feb 25 08:09:01 yorkdigitalsolutions CRON[25901]: (root) CMD ( [ -x /usr/lib/php5/maxlifetime ] && [ -x /usr/lib/php5/sessionclean ] && [ -d /var/lib/php5 ] && /usr/lib/php5/sessionclean /var/lib/php5 $$
    Feb 25 08:10:48 yorkdigitalsolutions kernel: [131632.649262] [UFW BLOCK] IN=eth0 OUT= MAC=04:01:7b:d6:9d:01:30:7c:5e:91:94:30:08:00 SRC=74.82.47.41 DST=159.203.3.34 LEN=29 TOS=0x00 PREC=0x00 TTL=57 ID=51$
    Feb 25 08:17:01 yorkdigitalsolutions CRON[25965]: (root) CMD ( cd / && run-parts --report /etc/cron.hourly)
    Feb 25 08:18:29 yorkdigitalsolutions kernel: [132093.715177] [UFW BLOCK] IN=eth0 OUT= MAC=04:01:7b:d6:9d:01:30:7c:5e:91:94:30:08:00 SRC=185.94.111.1 DST=159.203.3.34 LEN=122 TOS=0x00 PREC=0x00 TTL=243 ID$
    Feb 25 08:18:37 yorkdigitalsolutions kernel: [132101.234658] [UFW BLOCK] IN=eth0 OUT= MAC=04:01:7b:d6:9d:01:30:7c:5e:93:14:70:08:00 SRC=122.117.151.1 DST=159.203.3.34 LEN=29 TOS=0x00 PREC=0x00 TTL=51 ID=$
    Feb 25 08:18:39 yorkdigitalsolutions kernel: [132103.685152] [UFW BLOCK] IN=eth0 OUT= MAC=04:01:7b:d6:9d:01:30:7c:5e:93:14:70:08:00 SRC=122.117.151.1 DST=159.203.3.34 LEN=29 TOS=0x00 PREC=0x00 TTL=51 ID=$
    Feb 25 08:18:42 yorkdigitalsolutions kernel: [132106.198269] [UFW BLOCK] IN=eth0 OUT= MAC=04:01:7b:d6:9d:01:30:7c:5e:93:14:70:08:00 SRC=122.117.151.1 DST=159.203.3.34 LEN=29 TOS=0x00 PREC=0x00 TTL=51 ID=$
    Feb 25 08:21:56 yorkdigitalsolutions kernel: [132300.246197] [UFW BLOCK] IN=eth0 OUT= MAC=04:01:7b:d6:9d:01:30:7c:5e:91:94:30:08:00 SRC=218.246.0.97 DST=159.203.3.34 LEN=40 TOS=0x00 PREC=0x00 TTL=240 ID=$
    Feb 25 08:32:04 yorkdigitalsolutions kernel: [132908.199679] [UFW BLOCK] IN=eth0 OUT= MAC=04:01:7b:d6:9d:01:30:7c:5e:93:14:70:08:00 SRC=24.37.228.158 DST=159.203.3.34 LEN=52 TOS=0x00 PREC=0x00 TTL=121 ID$
    Feb 25 08:39:01 yorkdigitalsolutions CRON[26188]: (root) CMD ( [ -x /usr/lib/php5/maxlifetime ] && [ -x /usr/lib/php5/sessionclean ] && [ -d /var/lib/php5 ] && /usr/lib/php5/sessionclean /var/lib/php5 $$
    Feb 25 08:43:09 yorkdigitalsolutions kernel: [133573.840290] [UFW BLOCK] IN=eth0 OUT= MAC=04:01:7b:d6:9d:01:30:7c:5e:93:14:70:08:00 SRC=184.105.247.199 DST=159.203.3.34 LEN=40 TOS=0x00 PREC=0x00 TTL=248 $
    Feb 25 08:44:05 yorkdigitalsolutions kernel: [133629.133648] [UFW BLOCK] IN=eth0 OUT= MAC=04:01:7b:d6:9d:01:30:7c:5e:91:94:30:08:00 SRC=46.148.18.122 DST=159.203.3.34 LEN=40 TOS=0x00 PREC=0x00 TTL=236 ID$
    Feb 25 08:46:22 yorkdigitalsolutions kernel: [133766.633114] [UFW BLOCK] IN=eth0 OUT= MAC=04:01:7b:d6:9d:01:30:7c:5e:91:94:30:08:00 SRC=58.118.96.31 DST=159.203.3.34 LEN=40 TOS=0x00 PREC=0x00 TTL=101 ID=$
    Feb 25 08:46:41 yorkdigitalsolutions kernel: [133785.355029] [UFW BLOCK] IN=eth0 OUT= MAC=04:01:7b:d6:9d:01:30:7c:5e:93:14:70:08:00 SRC=192.42.132.101 DST=159.203.3.34 LEN=40 TOS=0x08 PREC=0x40 TTL=242 I$
    Feb 25 08:51:44 yorkdigitalsolutions kernel: [134088.286759] [UFW BLOCK] IN=eth0 OUT= MAC=04:01:7b:d6:9d:01:30:7c:5e:91:94:30:08:00 SRC=91.236.75.4 DST=159.203.3.34 LEN=40 TOS=0x00 PREC=0x00 TTL=239 ID=5$
    Feb 25 08:53:30 yorkdigitalsolutions kernel: [134194.614359] [UFW BLOCK] IN=eth0 OUT= MAC=04:01:7b:d6:9d:01:30:7c:5e:91:94:30:08:00 SRC=188.68.224.62 DST=159.203.3.34 LEN=40 TOS=0x08 PREC=0x20 TTL=237 ID$
    Feb 25 08:53:40 yorkdigitalsolutions kernel: [134204.369549] [UFW BLOCK] IN=eth0 OUT= MAC=04:01:7b:d6:9d:01:30:7c:5e:93:14:70:08:00 SRC=66.240.192.138 DST=159.203.3.34 LEN=40 TOS=0x08 PREC=0x20 TTL=109 I$
    Feb 25 08:53:53 yorkdigitalsolutions kernel: [134217.915318] [UFW BLOCK] IN=eth0 OUT= MAC=04:01:7b:d6:9d:01:30:7c:5e:91:94:30:08:00 SRC=113.225.156.226 DST=159.203.3.34 LEN=29 TOS=0x00 PREC=0x00 TTL=52 I$
    Feb 25 08:53:55 yorkdigitalsolutions kernel: [134219.725766] [UFW BLOCK] IN=eth0 OUT= MAC=04:01:7b:d6:9d:01:30:7c:5e:91:94:30:08:00 SRC=113.225.156.226 DST=159.203.3.34 LEN=29 TOS=0x00 PREC=0x00 TTL=52 I$
    Feb 25 08:53:58 yorkdigitalsolutions kernel: [134222.516232] [UFW BLOCK] IN=eth0 OUT= MAC=04:01:7b:d6:9d:01:30:7c:5e:91:94:30:08:00 SRC=113.225.156.226 DST=159.203.3.34 LEN=29 TOS=0x00 PREC=0x00 TTL=52 I$
    Feb 25 08:58:13 yorkdigitalsolutions kernel: [134477.210191] [UFW BLOCK] IN=eth0 OUT= MAC=04:01:7b:d6:9d:01:30:7c:5e:91:94:30:08:00 SRC=220.85.189.22 DST=159.203.3.34 LEN=52 TOS=0x08 PREC=0x20 TTL=45 ID=$
    Feb 25 08:58:16 yorkdigitalsolutions kernel: [134480.218035] [UFW BLOCK] IN=eth0 OUT= MAC=04:01:7b:d6:9d:01:30:7c:5e:91:94:30:08:00 SRC=220.85.189.22 DST=159.203.3.34 LEN=52 TOS=0x08 PREC=0x20 TTL=45 ID=$
    Feb 25 08:58:22 yorkdigitalsolutions kernel: [134486.228873] [UFW BLOCK] IN=eth0 OUT= MAC=04:01:7b:d6:9d:01:30:7c:5e:91:94:30:08:00 SRC=220.85.189.22 DST=159.203.3.34 LEN=52 TOS=0x08 PREC=0x20 TTL=45 ID=$
    Feb 25 09:06:53 yorkdigitalsolutions kernel: [134997.418459] [UFW BLOCK] IN=eth0 OUT= MAC=04:01:7b:d6:9d:01:30:7c:5e:91:94:30:08:00 SRC=169.54.244.78 DST=159.203.3.34 LEN=40 TOS=0x00 PREC=0x00 TTL=247 ID$
    Feb 25 09:08:29 yorkdigitalsolutions kernel: [135093.263838] [UFW BLOCK] IN=eth0 OUT= MAC=04:01:7b:d6:9d:01:30:7c:5e:93:14:70:08:00 SRC=78.144.240.8 DST=159.203.3.34 LEN=60 TOS=0x00 PREC=0x00 TTL=48 ID=3$
    Feb 25 09:08:35 yorkdigitalsolutions kernel: [135099.262031] [UFW BLOCK] IN=eth0 OUT= MAC=04:01:7b:d6:9d:01:30:7c:5e:93:14:70:08:00 SRC=78.144.240.8 DST=159.203.3.34 LEN=60 TOS=0x00 PREC=0x00 TTL=48 ID=3$
    Feb 25 09:09:01 yorkdigitalsolutions CRON[26360]: (root) CMD ( [ -x /usr/lib/php5/maxlifetime ] && [ -x /usr/lib/php5/sessionclean ] && [ -d /var/lib/php5 ] && /usr/lib/php5/sessionclean /var/lib/php5 $$
    Feb 25 09:10:52 yorkdigitalsolutions kernel: [135236.708666] [UFW BLOCK] IN=eth0 OUT= MAC=04:01:7b:d6:9d:01:30:7c:5e:93:14:70:08:00 SRC=161.202.165.6 DST=159.203.3.34 LEN=441 TOS=0x00 PREC=0x00 TTL=53 ID$
    Feb 25 09:16:29 yorkdigitalsolutions postfix/postfix-script[26435]: the Postfix mail system is not running
    Feb 25 09:17:01 yorkdigitalsolutions CRON[26437]: (root) CMD ( cd / && run-parts --report /etc/cron.hourly)
    Feb 25 09:17:08 yorkdigitalsolutions kernel: [135612.157809] [UFW BLOCK] IN=eth0 OUT= MAC=04:01:7b:d6:9d:01:30:7c:5e:93:14:70:08:00 SRC=23.251.41.96 DST=159.203.3.34 LEN=40 TOS=0x00 PREC=0x00 TTL=113 ID=$
    Feb 25 09:18:19 yorkdigitalsolutions postfix/master[26560]: fatal: bind 127.0.0.1 port 25: Address already in use
    Feb 25 09:19:08 yorkdigitalsolutions postfix[26564]: error: to submit mail, use the Postfix sendmail command
    Feb 25 09:19:08 yorkdigitalsolutions postfix[26564]: fatal: the postfix command is reserved for the superuser
    Feb 25 09:19:23 yorkdigitalsolutions kernel: [135747.946319] [UFW BLOCK] IN=eth0 OUT= MAC=04:01:7b:d6:9d:01:30:7c:5e:93:14:70:08:00 SRC=23.228.101.206 DST=159.203.3.34 LEN=121 TOS=0x08 PREC=0x40 TTL=239 $
    Feb 25 09:19:58 yorkdigitalsolutions kernel: [135782.437151] [UFW BLOCK] IN=eth0 OUT= MAC=04:01:7b:d6:9d:01:30:7c:5e:91:94:30:08:00 SRC=220.228.59.11 DST=159.203.3.34 LEN=40 TOS=0x00 PREC=0x00 TTL=106 ID$
    Feb 25 09:20:03 yorkdigitalsolutions postfix/postfix-script[26598]: the Postfix mail system is not running
    Feb 25 09:30:26 yorkdigitalsolutions kernel: [136410.511624] [UFW BLOCK] IN=eth0 OUT= MAC=04:01:7b:d6:9d:01:30:7c:5e:91:94:30:08:00 SRC=71.6.135.131 DST=159.203.3.34 LEN=40 TOS=0x08 PREC=0x20 TTL=109 ID=$
    Feb 25 09:38:50 yorkdigitalsolutions kernel: [136915.036873] [UFW BLOCK] IN=eth0 OUT= MAC=04:01:7b:d6:9d:01:30:7c:5e:91:94:30:08:00 SRC=125.90.89.92 DST=159.203.3.34 LEN=40 TOS=0x00 PREC=0x00 TTL=107 ID=$
    eb 25 09:39:01 yorkdigitalsolutions CRON[26724]: (root) CMD ( [ -x /usr/lib/php5/maxlifetime ] && [ -x /usr/lib/php5/sessionclean ] && [ -d /var/lib/php5 ] && /usr/lib/php5/sessionclean /var/lib/php5 $$
    Feb 25 09:42:54 yorkdigitalsolutions kernel: [137158.247701] [UFW BLOCK] IN=eth0 OUT= MAC=04:01:7b:d6:9d:01:30:7c:5e:91:94:30:08:00 SRC=201.92.12.167 DST=159.203.3.34 LEN=60 TOS=0x00 PREC=0x00 TTL=49 ID=$
    Feb 25 09:42:57 yorkdigitalsolutions kernel: [137161.240076] [UFW BLOCK] IN=eth0 OUT= MAC=04:01:7b:d6:9d:01:30:7c:5e:91:94:30:08:00 SRC=201.92.12.167 DST=159.203.3.34 LEN=60 TOS=0x00 PREC=0x00 TTL=49 ID=$
    Feb 25 09:43:21 yorkdigitalsolutions kernel: [137185.354377] [UFW BLOCK] IN=eth0 OUT= MAC=04:01:7b:d6:9d:01:30:7c:5e:93:14:70:08:00 SRC=209.126.122.102 DST=159.203.3.34 LEN=444 TOS=0x00 PREC=0x00 TTL=58 $
    Feb 25 09:49:37 yorkdigitalsolutions kernel: [137561.116209] [UFW BLOCK] IN=eth0 OUT= MAC=04:01:7b:d6:9d:01:30:7c:5e:93:14:70:08:00 SRC=186.46.221.202 DST=159.203.3.34 LEN=29 TOS=0x00 PREC=0x00 TTL=49 ID$
    Feb 25 09:49:39 yorkdigitalsolutions kernel: [137563.555104] [UFW BLOCK] IN=eth0 OUT= MAC=04:01:7b:d6:9d:01:30:7c:5e:93:14:70:08:00 SRC=186.46.221.202 DST=159.203.3.34 LEN=29 TOS=0x00 PREC=0x00 TTL=49 ID$
    Feb 25 09:49:40 yorkdigitalsolutions kernel: [137564.969846] [UFW BLOCK] IN=eth0 OUT= MAC=04:01:7b:d6:9d:01:30:7c:5e:93:14:70:08:00 SRC=186.46.221.202 DST=159.203.3.34 LEN=29 TOS=0x00 PREC=0x00 TTL=49 ID$
    Feb 25 09:53:03 yorkdigitalsolutions kernel: [137767.524937] [UFW BLOCK] IN=eth0 OUT= MAC=04:01:7b:d6:9d:01:30:7c:5e:91:94:30:08:00 SRC=202.196.113.50 DST=159.203.3.34 LEN=40 TOS=0x08 PREC=0x20 TTL=96 ID$

  • ok, how do stop sendmail?

  • ok, so I stopped it, and tried to send an email. Still no luck.

    This is the logs

    Feb 25 10:47:57 yorkdigitalsolutions postfix/pickup[2127]: 9B33F306: uid=0 from=root@yorkdigitalsolutions.com
    Feb 25 10:47:57 yorkdigitalsolutions postfix/cleanup[3541]: 9B33F306: message-id=20160225154757.9B33F306@yorkdigitalsolutions.com
    Feb 25 10:47:57 yorkdigitalsolutions postfix/qmgr[2129]: 9B33F306: from=root@yorkdigitalsolutions.com, size=435, nrcpt=3 (queue active)
    Feb 25 10:47:57 yorkdigitalsolutions postfix/local[3544]: 9B33F306: to=digitalocean@yorkdigitalsolutions.com, relay=local, delay=0.04, delays=0.02/0.01/0/0.01, dsn=5.1.1, status=bounced (unknown user: $
    Feb 25 10:47:57 yorkdigitalsolutions postfix/local[3545]: 9B33F306: to=of@yorkdigitalsolutions.com, relay=local, delay=0.04, delays=0.02/0.02/0/0, dsn=5.1.1, status=bounced (unknown user: "of")
    Feb 25 10:47:58 yorkdigitalsolutions postfix/smtp[3543]: 9B33F306: to=<jr_jr5@hotmail.com>, relay=mx4.hotmail.com[65.54.188.94]:25, delay=0.41, delays=0.02/0.01/0.3/0.09, dsn=5.0.0, status=bounced (host $
    Feb 25 10:47:58 yorkdigitalsolutions postfix/smtp[3543]: 9B33F306: lost connection with mx4.hotmail.com[65.54.188.94] while sending RCPT TO
    Feb 25 10:47:58 yorkdigitalsolutions postfix/cleanup[3541]: 0A466307: message-id=20160225154758.0A466307@yorkdigitalsolutions.com
    Feb 25 10:47:58 yorkdigitalsolutions postfix/qmgr[2129]: 0A466307: from=<>, size=3293, nrcpt=1 (queue active)
    Feb 25 10:47:58 yorkdigitalsolutions postfix/bounce[3547]: 9B33F306: sender non-delivery notification: 0A466307
    Feb 25 10:47:58 yorkdigitalsolutions postfix/qmgr[2129]: 9B33F306: removed
    Feb 25 10:47:58 yorkdigitalsolutions postfix/local[3544]: 0A466307: to=root@yorkdigitalsolutions.com, relay=local, delay=0.02, delays=0.01/0/0/0.01, dsn=2.0.0, status=sent (delivered to command: procma$
    Feb 25 10:47:58 yorkdigitalsolutions postfix/qmgr[2129]: 0A466307: removed
    Feb 25 10:49:49 yorkdigitalsolutions postfix/pickup[2127]: 667F5306: uid=33 from=<www-data>
    Feb 25 10:49:49 yorkdigitalsolutions postfix/cleanup[3805]: 667F5306: message-id=e5d773b75a2e1f44d1440b81784ffa78@test.verobergeron.com
    Feb 25 10:49:49 yorkdigitalsolutions postfix/qmgr[2129]: 667F5306: from=www-data@mail.ydsinc.ca, size=903, nrcpt=1 (queue active)
    Feb 25 10:49:49 yorkdigitalsolutions postfix/smtp[3807]: connect to aspmx.l.google.com[2607:f8b0:400d:c08::1b]:25: Network is unreachable
    Feb 25 10:49:49 yorkdigitalsolutions postfix/smtp[3807]: 667F5306: to=info@ydsinc.ca, relay=aspmx.l.google.com[74.125.29.27]:25, delay=0.57, delays=0.03/0.02/0.37/0.15, dsn=5.7.1, status=bounced (host $
    Feb 25 10:49:49 yorkdigitalsolutions postfix/cleanup[3805]: EEB29307: message-id=20160225154949.EEB29307@yorkdigitalsolutions.com
    Feb 25 10:49:49 yorkdigitalsolutions postfix/qmgr[2129]: EEB29307: from=<>, size=3491, nrcpt=1 (queue active)
    Feb 25 10:49:49 yorkdigitalsolutions postfix/bounce[3808]: 667F5306: sender non-delivery notification: EEB29307
    Feb 25 10:49:49 yorkdigitalsolutions postfix/qmgr[2129]: 667F5306: removed
    Feb 25 10:49:50 yorkdigitalsolutions postfix/local[3810]: EEB29307: to=www-data@mail.ydsinc.ca, relay=local, delay=0.02, delays=0/0.01/0/0.01, dsn=2.0.0, status=sent (delivered to command: procmail -a $
    Feb 25 10:49:50 yorkdigitalsolutions postfix/qmgr[2129]: EEB29307: removed

  • @yorkdigitalsolutions - Your postfix daemon is running and processing your mail queue. Your pandora's box is open, and now you need to deal with what's in it and what comes out of it, which should be in another question(s). I recommend starting with trying to figure out why you don't have a user named 'of':

    Feb 25 10:47:57 yorkdigitalsolutions postfix/local[3545]: 9B33F306: to=of@yorkdigitalsolutions.com, relay=local, delay=0.04, delays=0.02/0.02/0/0, dsn=5.1.1, status=bounced (unknown user: "of")
    

    And then making sure 'postfix check' returns no anomalies. Good luck.

2 Answers

I used this one : https://www.digitalocean.com/community/tutorials/how-to-install-and-setup-postfix-on-ubuntu-14-04

Should I be using another? What I would like is to have php be able to send mail to customers and wordpress to be able to email out passwords and such.

Thanks

by Justin Ellingwood
Postfix is one of the most popular open source mail delivery agents (MTA) in the world. In this guide, we will demonstrate how to install and configure a simple Postfix setup on an Ubuntu 14.04 server.

@yorkdigitalsolutions - You have both sendmail and postfix installed and active. You need to disable sendmail for postfix to work.

Have another answer? Share your knowledge.