Can't get email server working

I’ve been looking around at posts going back to 2012 on this and can’t find an answer.

I’m trying to send an email from the webmail to my normal home email address and it doesn’t work. I get an error saying it can’t connect to the SMTP server.

When I check the mail log in var/log/email it shows this over and over again:
Jun 9 13:45:54 server1 postfix/smtp[26419]: fatal: specify a password table via the `smtp_sasl_password_maps’ configuration parameter
Jun 9 13:45:55 server1 postfix/master[2068]: warning: process /usr/lib/postfix/sbin/smtp pid 26419 exit status 1
Jun 9 13:45:55 server1 postfix/master[2068]: warning: /usr/lib/postfix/sbin/smtp: bad command startup – throttling

Any help would be greatly appreciated.

You’ve improperly setup mail relaying. If you’re trying to relay through another server that requires authentication, you’ll need to configure it properly. Or, disable relayhost.

Transport mapping is set to none.

More info:

I’ve not changed the default email settings. Everything I read said it should work as is so I didn’t want to mess anything up.

All I did was install RoundCube web mail. I go there and it has my information in it. I tried to send an email from it to my regular home email address and it gives the SMTP error 421 - can’t connect to server.

Client errors are not useful information.

But, of course it can’t connect, Postfix failed to start as the log entries above said.

Your configuration is definitely not default. We don’t setup relaying and and the default package doesn’t have it enabled. Check relayhost. If it’s not in a transport map, then it’s gotta be relayhost as I mentioned above. Your postfix is configured to relay…but incompletely. So, undo that.


I did a search for disable relay and it said set the map to none but that was already set to none.


In /etc/postfix/ You or someone else has set it. So, unset it. Just delete the relayhost line from your config.

1 Like

Sir, as a layman I know I’m driving you insane, but here is my entire with just username, host name and IP deleted. I don’t see any relayhost line in it anywhere:

# See /usr/share/postfix/ 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

biff = no

# appending .domain is the MUA's job.
append_dot_mydomain = no

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

readme_directory = no

# See -- default to 2 on
# fresh installs.
compatibility_level = 2

# TLS parameters
smtpd_tls_cert_file = /home/__________/ssl.cert
smtpd_tls_key_file = /home/__________/ssl.key
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache

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

smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated defer_unauth_destination
myhostname =
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
mydestination = $myhostname, localhost.$mydomain, $mydomain
mynetworks = [::ffff:]/104 [::1]/000
mailbox_size_limit = 0
recipient_delimiter = +
inet_protocols = all
virtual_alias_maps = hash:/etc/postfix/virtual
sender_bcc_maps = hash:/etc/postfix/bcc
mailbox_command = /usr/bin/procmail-wrapper -o -a $DOMAIN -d $LOGNAME
home_mailbox = Maildir/
smtpd_sasl_auth_enable = yes
broken_sasl_auth_clients = yes
smtpd_recipient_restrictions = permit_mynetworks permit_sasl_authenticated reject_unauth_destination check_policy_service inet:
smtp_tls_security_level = dane
allow_percent_hack = no
smtpd_tls_security_level = encrypt
smtpd_tls_mandatory_protocols = !SSLv2, !SSLv3, !TLSv1, !TLSv1.1
mynetworks_style = subnet
mydomain =
smtpd_tls_CAfile = /home/___________/
smtp_sasl_auth_enable = yes
milter_default_action = accept
milter_protocol = 2
smtpd_milters = inet:localhost:8891
non_smtpd_milters = inet:localhost:8891

This is wrong. (Unless you’re relaying through a host that needs authentication.)

Also probably wrong.

Definitely wrong. A see a few other nonstandard things that might be wrong, or might be right, but I can’t spend the time to sort it out for you. This looks like a very complicated setup. You keep saying you haven’t changed anything, but the Virtualmin installer certainly didn’t do this and the stock postfix package on our supported distros don’t look anything like this.

Where did you get all this extra TLS client SMTP configuration stuff from? You’ve got yourself a very messed up config that can’t possibly work. You should just start over and don’t break it again. :wink:

Reinstall postfix, to get fresh config files, and then run virtualmin config-system --include Postfix

Thank you, sir. I’ll give that a go.

I have no idea where the extra stuff came from. The only thing I really changed after the install was the name servers so I could run Cloudflare. The sites run great, no problems at all. It’s just that the email server has never worked.

I’ve got a year to figure it out though while we’re using another pay one so that’s why I’m starting now.

Again, thank you for all your help and I’m sorry for driving you nuts with my noobness.

You’re not going to believe this, but when I run the virtualmin config-system --include Postfix command I get this:

Can't locate Virtualmin/ in @INC (you may need to install the Virtualmin::Config module) (@INC contains: /usr/share/webmin /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.26.1 /usr/local/share/perl/5.26.1 /usr/lib/x86_64-linux-gnu/perl5/5.26 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.26 /usr/share/perl/5.26 /usr/local/lib/site_perl /usr/lib/x86_64-linux-gnu/perl-base) at /usr/share/webmin/virtual-server/ line 9.

BEGIN failed–compilation aborted at /usr/share/webmin/virtual-server/ line 9.

Maybe time to start over fresh? You’ve manually installed a custom Perl. I can’t help with that. It’s hard enough to support a system that looks like everybody else’s.

That would wipe out my websites.

Oh well. Thanks for all your help and sorry for driving you nuts. Feel free to close this.

OK, best of luck.

If you want to try manually making the default Virtualmin config changes, you can see what we do (what that virtualmin command above would have done if things were running under the system Perl) in this file:

You could also try fixing your perl so the system Perl is the first one in the PATH. Though it’s also possible that if you installed that custom Perl before Webmin it would have used it which would be terrible. :wink:

Oh, you could also try running /usr/bin/perl virtualmin-config-system --include Postfix

Maybe that’ll get the right perl library paths. Maybe. It may still bail when it tries to load Webmin modules.

1 Like

mynetworks = [::ffff:]/104 [::1]/128

inet_protocols = ipv4

Try those changes - the rest of your config looks ok. I’ve just compared it to mine (which now works.)

ps. forgot to mention

myhostname =

shouldn’t be that. Assuming you set hostname to say myServer and your FQDN to the entry should be

myhostname = myServer.myDomaincom

Mine does say that with one exception. I edited all that out in the original posting due to paranoia.

The only difference between yours and mine is my inet_protocols = all.

When you say you edited all that out - do you mean you “corrected it” or “commented it out” - it’s a little unclear to me.




I edited it out for posting on the forum because I didn’t want the admin username and IP to be posted in public.

Sorry for any confusion.

In - your IP should be - there’s nothing sensitive in that. It’s the local loopback address. It’s the same for all servers. It should not be you external IP.

You’re not very bright, are you?

It had my broadcast IP on it and my username for root user. I removed it. That’s all there is to it. The other gentleman understood it with perfect clarity and didn’t have to ask a thing. You on the other hand are making a complete issue of it for no reason whatsoever other than I imagine your own self-importance.

Let it go.