I first installed Virtualmin on my server which I used to install Postfix + Dovecot and later Roundcube. All was working well, until due to a wordpress plugin issue my server began to send SPAM email.
After following a number of tutorials I, noobishly, unisntalled Postfix (to prevent emails from being sent) while I debug.
Now I’m at a place where I’ve re-installed Postfix but to get it to work seems impossible, I’ve been stuck for days now.
I’m no longer able to send or receive emails.
Whenever I now login to my mail client (Roundcube) I notice from mail.log which makes it seem as if I’m being immedidately disconnected:
Jul 6 12:03:55 zh dovecot: imap-login: Login: user=<test>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, mpid=16236, secured, session=<eGB7DTcaWgB/AAAB>
Jul 6 12:03:55 zh dovecot: imap(test): Disconnected: Logged out in=82 out=609
Jul 6 12:03:55 zh dovecot: imap-login: Login: user=<test>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, mpid=16241, secured, session=<ouF9DTcaWwB/AAAB>
Jul 6 12:03:55 zh dovecot: imap(test): Disconnected: Logged out in=44 out=556
Jul 6 12:03:56 zh dovecot: imap-login: Login: user=<test>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, mpid=16247, secured, session=<n6qGDTcaXAB/AAAB>
Jul 6 12:03:56 zh dovecot: imap-login: Login: user=<test>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, mpid=16248, secured, session=<Er2GDTcaXQB/AAAB>
Jul 6 12:03:56 zh dovecot: imap(test): Disconnected: Logged out in=50 out=469
Jul 6 12:03:56 zh dovecot: imap(test): Disconnected: Logged out in=233 out=885
Whenever I send mail, in this case through Roundcube, I get this from my mail.logfile:
Jul 3 16:43:20 zm postfix/smtpd[30489]: connect from localhost[127.0.0.1]
Jul 3 16:43:20 zm postfix/smtpd[30489]: disconnect from localhost[127.0.0.1]
This error produce this Roundcube error message:
SMTP Error (250): Authentication failed.
In my mail.err log file I have this:
Jul 2 01:08:25 zm postfix/master[18886]: fatal: bind 0.0.0.0 port 25: Address already in use
Jul 2 01:09:07 zm postfix/postqueue[19034]: warning: Mail system is down -- accessing queue directly
Jul 2 01:09:27 zm postfix/postfix-script[19065]: fatal: the Postfix mail system is not running
Jul 2 01:09:33 zm postfix/master[19159]: fatal: bind 0.0.0.0 port 25: Address already in use
Jul 2 01:16:31 zm postfix/postfix-script[19660]: error: unknown command: ''
Jul 2 01:16:31 zm postfix/postfix-script[19661]: fatal: usage: postfix start (or stop, reload, abort, flush, check, status, set-permission
s, upgrade-configuration)
Jul 2 01:16:35 zm postfix/postfix-script[19667]: error: unknown command: ''
Jul 2 01:16:35 zm postfix/postfix-script[19668]: fatal: usage: postfix start (or stop, reload, abort, flush, check, status, set-permission
s, upgrade-configuration)
Jul 2 01:19:30 zm postfix/master[20032]: fatal: bind 0.0.0.0 port 25: Address already in use
Jul 2 01:19:31 zm postfix/master[20031]: fatal: daemon initialization failure
Jul 2 01:19:32 zm postfix/postfix-script[20033]: fatal: mail system startup failed
Jul 2 01:19:44 zm postfix/master[20141]: fatal: bind 0.0.0.0 port 25: Address already in use
Jul 2 01:19:50 zm postfix/master[20242]: fatal: bind 0.0.0.0 port 25: Address already in use
Jul 2 01:19:51 zm postfix/master[20241]: fatal: daemon initialization failure
Jul 2 01:19:52 zm postfix/postfix-script[20243]: fatal: mail system startup failed
Jul 2 01:20:00 zm postfix/master[20370]: fatal: bind 0.0.0.0 port 25: Address already in use
When I run *virtualmin check-config *this is some of the output:
"Mail server Postfix is installed and configured.
Postfix can support per-domain outgoing IP addresses, but is not currently configured to do so. This can be setup in the Postfix Mailserver module."
vi /etc/postfix/main.cf
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 = no
TLS parameters
smtpdtlscertfile=/etc/ssl/certs/ssl-cert-snakeoil.pem
smtpdtlskeyfile=/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 = ichangedmydomain.com
aliasmaps = hash:/etc/aliases
virtualaliasmaps = hash:/etc/aliases
virtualaliasmaps = hash:/etc/postfix/virtual
aliasdatabase = hash:/etc/aliases
myorigin = /etc/mailname
mydestination = ichangedmydomain.com, localhost.com, , localhost
relayhost =
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
mailboxcommand = procmail -a "$EXTENSION"
mailboxsizelimit = 0
recipientdelimiter = +
inetinterfaces = all
inet_protocols = all
Please I’d appreciate any help. (I’m not in a position to pay, this is for learning purposes mostly).
Thank you in advance.