Hello, Ive been using Webmin and Virtualmin for over a year now but never bothered to setup email for my domains.
Today I installed Postfix and I can send email from my server but when trying to receive an email from outside I get an error message that reads like this:
The error that the other server returned was: 554 554 5.7.1 <example@domain.com>: Relay access denied (state 14).
I spend a whole day googling and trying to troubleshoot this error. My hosting company doesn’t support my server and points me to a tutorial that doesn’t answer my question.
Can you tell me where to find the solution to this error?
Hrm, if you’ve been using Virtualmin for over a year, but just installed Postfix today, I assume that means that the Virtualmin install wasn’t with the install.sh script
There’s a few things that the install.sh script configures for you to allow SpamAssassin, ClamAV, filters, and email in general to work.
You probably don’t have any of those
For starters, you need a line like this in your /etc/postfix/main.cf in order for Postfix to see your email users:
If you don’t already have it in there, I’d suggesting adding that line, restarting Postfix (/etc/init.d/postfix restart), and then we’ll work from there.
-Eric
Bad idea. Set just virtual_alias_maps as Eric suggested, and get rid of virtual_alias_domains.
You’ll also want to have a look at this mail setup script (I don’t know that you’d want to run it, since it could break other things you have setup, just look at it and make sure your configurations look pretty similar):
OK I Amended the file like Eric said and I looked at http://software.virtualmin.com/lib/mail-setup.pl but in which folder can I find my mail setup so I can make it look like this file? Or do I find it under the Postfix Servertab in Webmin?
Eric speaks true. And, perhaps I overestimate how readable a Perl program is to the average user.
The thing is, there’s just a lot of configuration that goes into setting up mail in a virtual hosting system, and there’s no authoritative guide for it, outside of the script.
But, now that I read over this again, I realize you haven’t actually been using mail, so there’s nothing to break. I would suggest running mail-setup.pl.
There may be some errors, since your system is completely unpredictable, and has some weird configuration choices already in place. But, it’ll at least fix the things it knows how to fix. There may be more cleanup to be done manually, but it should be less than not using the script.
Uh guys… Apparently it did mess things up a bit. Mails that are send internally by sites on the server now end up in the Mail Queue. And I cant read them there either because then I get the message that their no longer in the Queue. And when setting up a domain ‘mapping’ fails. What is the next step I must take to configure the mail properly? Should I ad the sites names somewhere?
It’s going to be a process to get email fully working, since anything but using the install.sh script on a fresh system to setup email is technically “the hard way”
We’ll get it though – anytime an issue comes up, we just need to troubleshoot to figure out what’s going on.
The thing to do would be to look in the email log in /var/log/ – either maillog or mail.log – and find out what the error message you’re getting is, and then post that up here.
-Eric
I’m using Debian Linux 4.0.
I think those software packages were already installed. Yum wasn’t and after installing it and executing the code you gave me this is what it reported:
> yum install cyrus-sasl dovecot spamassassin cyrus-sasl-gssapi
No Repositories Available to Set Up
No Match for argument: cyrus-sasl
No Match for argument: dovecot
No Match for argument: spamassassin
No Match for argument: cyrus-sasl-gssapi
Warning, could not load sqlite, falling back to pickle
Setting up Install Process
Setting up repositories
Reading repository metadata in from local files
Parsing package install arguments
Nothing to do
I feel I’m finaly getting somewhere with you guys helping. What is next?
This is the result. It says Abort on the end, does that mean it didnt work?
> apt-get install sasl2-bin spamassassin dovecot-common dovecot-imapd dovecot-pop3d
Reading package lists…
Building dependency tree…
The following extra packages will be installed:
libarchive-tar-perl libcompress-zlib-perl libdigest-sha1-perl
libhtml-parser-perl libhtml-tagset-perl libhtml-tree-perl libio-zlib-perl
libsocket6-perl liburi-perl libwww-perl
Suggested packages:
libio-string-perl libio-socket-ssl-perl razor libnet-ident-perl dcc-client
pyzor
Recommended packages:
libmailtools-perl libhtml-format-perl spamc libmail-spf-query-perl
libnet-dns-perl
The following NEW packages will be installed:
dovecot-common dovecot-imapd dovecot-pop3d libarchive-tar-perl
libcompress-zlib-perl libdigest-sha1-perl libhtml-parser-perl
libhtml-tagset-perl libhtml-tree-perl libio-zlib-perl libsocket6-perl
liburi-perl libwww-perl sasl2-bin spamassassin
0 upgraded, 15 newly installed, 0 to remove and 76 not upgraded.
Need to get 4245kB of archives.
After unpacking 10.3MB of additional disk space will be used.
Do you want to continue [Y/n]? Abort.
Mail log says this
Apr 23 20:13:55 ded21 postfix/smtpd[15495]: warning: xsasl_cyrus_server_get_mechanism_list: no applicable SASL mechanisms
Apr 23 20:13:55 ded21 postfix/smtpd[15495]: fatal: no SASL authentication mechanisms
Apr 23 20:13:56 ded21 postfix/master[15031]: warning: process /usr/lib/postfix/smtpd pid 15495 exit status 1
Apr 23 20:13:56 ded21 postfix/master[15031]: warning: /usr/lib/postfix/smtpd: bad command startup – throttling
Apr 23 20:14:56 ded21 postfix/smtpd[15571]: warning: xsasl_cyrus_server_get_mechanism_list: no applicable SASL mechanisms
Apr 23 20:14:56 ded21 postfix/smtpd[15571]: fatal: no SASL authentication mechanisms
Apr 23 20:14:56 ded21 postfix/smtpd[15573]: warning: xsasl_cyrus_server_get_mechanism_list: no applicable SASL mechanisms
Apr 23 20:14:56 ded21 postfix/smtpd[15573]: fatal: no SASL authentication mechanisms
Apr 23 20:14:56 ded21 postfix/smtpd[15574]: warning: xsasl_cyrus_server_get_mechanism_list: no applicable SASL mechanisms
Apr 23 20:14:56 ded21 postfix/smtpd[15574]: fatal: no SASL authentication mechanisms
Apr 23 20:14:57 ded21 postfix/master[15031]: warning: process /usr/lib/postfix/smtpd pid 15571 exit status 1
Apr 23 20:14:57 ded21 postfix/master[15031]: warning: /usr/lib/postfix/smtpd: bad command startup – throttling
Apr 23 20:14:57 ded21 postfix/master[15031]: warning: process /usr/lib/postfix/smtpd pid 15573 exit status 1
Apr 23 20:14:57 ded21 postfix/master[15031]: warning: process /usr/lib/postfix/smtpd pid 15574 exit status 1
Apr 23 20:15:02 ded21 postfix/sendmail[15594]: fatal: usage: sendmail [options]
Apr 23 20:15:57 ded21 postfix/smtpd[15605]: warning: xsasl_cyrus_server_get_mechanism_list: no applicable SASL mechanisms
Apr 23 20:15:57 ded21 postfix/smtpd[15605]: fatal: no SASL authentication mechanisms
Apr 23 20:15:57 ded21 postfix/smtpd[15607]: warning: xsasl_cyrus_server_get_mechanism_list: no applicable SASL mechanisms
Apr 23 20:15:57 ded21 postfix/smtpd[15607]: fatal: no SASL authentication mechanisms
Apr 23 20:15:57 ded21 postfix/smtpd[15608]: warning: xsasl_cyrus_server_get_mechanism_list: no applicable SASL mechanisms
Apr 23 20:15:57 ded21 postfix/smtpd[15608]: fatal: no SASL authentication mechanisms
Apr 23 20:15:58 ded21 postfix/master[15031]: warning: process /usr/lib/postfix/smtpd pid 15605 exit status 1
Apr 23 20:15:58 ded21 postfix/master[15031]: warning: /usr/lib/postfix/smtpd: bad command startup – throttling
Apr 23 20:15:58 ded21 postfix/master[15031]: warning: process /usr/lib/postfix/smtpd pid 15607 exit status 1
Apr 23 20:15:58 ded21 postfix/master[15031]: warning: process /usr/lib/postfix/smtpd pid 15608 exit status 1
Apr 23 20:16:30 ded21 postfix/master[15031]: terminating on signal 15
Apr 23 20:16:30 ded21 postfix/master[15685]: daemon started – version 2.3.8, configuration /etc/postfix
Apr 23 20:16:32 ded21 postfix/smtpd[15688]: warning: xsasl_cyrus_server_get_mechanism_list: no applicable SASL mechanisms
Apr 23 20:16:32 ded21 postfix/smtpd[15688]: fatal: no SASL authentication mechanisms
Apr 23 20:16:33 ded21 postfix/master[15685]: warning: process /usr/lib/postfix/smtpd pid 15688 exit status 1
It does mean it did not work. Normally, you’d hit “y” there and it would continue on it’s merry way, installing those packages! I’m not sure why it aborted.
> apt-get install sasl2-bin
Reading package lists…
Building dependency tree…
The following NEW packages will be installed:
sasl2-bin
0 upgraded, 1 newly installed, 0 to remove and 76 not upgraded.
Need to get 124kB of archives.
After unpacking 336kB of additional disk space will be used.
Get:1 http://ftp.nluug.nl etch/main sasl2-bin 2.1.22.dfsg1-8 [124kB]
debconf: unable to initialize frontend: Dialog
debconf: (TERM is not set, so the dialog frontend is not usable.)
debconf: falling back to frontend: Readline
debconf: unable to initialize frontend: Readline
debconf: (This frontend requires a controlling tty.)
debconf: falling back to frontend: Teletype
dpkg-preconfigure: unable to re-open stdin:
Fetched 124kB in 0s (2066kB/s)
Selecting previously deselected package sasl2-bin.
(Reading database … 40914 files and directories currently installed.)
Unpacking sasl2-bin (from …/sasl2-bin_2.1.22.dfsg1-8_i386.deb) …
Setting up sasl2-bin (2.1.22.dfsg1-8) …
warning: --update given but /var/run/saslauthd does not exist
To enable saslauthd, edit /etc/default/saslauthd and set START=yes
> /etc/init.d/postfix restart
Stopping Postfix Mail Transport Agent: postfix.
Starting Postfix Mail Transport Agent: postfix.
I send some emails and mail log says this
Apr 23 20:24:40 ded21 postfix/master[15685]: terminating on signal 15
Apr 23 20:24:40 ded21 postfix/master[15924]: daemon started – version 2.3.8, configuration /etc/postfix
Apr 23 20:24:50 ded21 postfix/smtpd[15927]: warning: xsasl_cyrus_server_get_mechanism_list: no applicable SASL mechanisms
Apr 23 20:24:50 ded21 postfix/smtpd[15927]: fatal: no SASL authentication mechanisms
Apr 23 20:24:51 ded21 postfix/master[15924]: warning: process /usr/lib/postfix/smtpd pid 15927 exit status 1
Apr 23 20:24:51 ded21 postfix/master[15924]: warning: /usr/lib/postfix/smtpd: bad command startup – throttling
Apr 23 20:25:03 ded21 postfix/sendmail[15950]: fatal: usage: sendmail [options]
Apr 23 20:25:51 ded21 postfix/smtpd[16035]: warning: xsasl_cyrus_server_get_mechanism_list: no applicable SASL mechanisms
Apr 23 20:25:51 ded21 postfix/smtpd[16035]: fatal: no SASL authentication mechanisms
Apr 23 20:25:51 ded21 postfix/smtpd[16037]: warning: xsasl_cyrus_server_get_mechanism_list: no applicable SASL mechanisms
Apr 23 20:25:51 ded21 postfix/smtpd[16037]: fatal: no SASL authentication mechanisms
Apr 23 20:25:51 ded21 postfix/smtpd[16038]: warning: xsasl_cyrus_server_get_mechanism_list: no applicable SASL mechanisms
Apr 23 20:25:51 ded21 postfix/smtpd[16038]: fatal: no SASL authentication mechanisms
Apr 23 20:25:51 ded21 postfix/smtpd[16039]: warning: xsasl_cyrus_server_get_mechanism_list: no applicable SASL mechanisms
Apr 23 20:25:51 ded21 postfix/smtpd[16039]: fatal: no SASL authentication mechanisms
Apr 23 20:25:51 ded21 postfix/smtpd[16040]: warning: xsasl_cyrus_server_get_mechanism_list: no applicable SASL mechanisms
Apr 23 20:25:51 ded21 postfix/smtpd[16040]: fatal: no SASL authentication mechanisms
Apr 23 20:25:51 ded21 postfix/smtpd[16041]: warning: xsasl_cyrus_server_get_mechanism_list: no applicable SASL mechanisms
Apr 23 20:25:51 ded21 postfix/smtpd[16041]: fatal: no SASL authentication mechanisms
Apr 23 20:25:51 ded21 postfix/smtpd[16042]: warning: xsasl_cyrus_server_get_mechanism_list: no applicable SASL mechanisms
Apr 23 20:25:51 ded21 postfix/smtpd[16042]: fatal: no SASL authentication mechanisms
Apr 23 20:25:52 ded21 postfix/master[15924]: warning: process /usr/lib/postfix/smtpd pid 16035 exit status 1
Apr 23 20:25:52 ded21 postfix/master[15924]: warning: /usr/lib/postfix/smtpd: bad command startup – throttling
Apr 23 20:25:52 ded21 postfix/master[15924]: warning: process /usr/lib/postfix/smtpd pid 16037 exit status 1
Apr 23 20:25:52 ded21 postfix/master[15924]: warning: process /usr/lib/postfix/smtpd pid 16038 exit status 1
Apr 23 20:25:52 ded21 postfix/master[15924]: warning: process /usr/lib/postfix/smtpd pid 16039 exit status 1
Apr 23 20:25:52 ded21 postfix/master[15924]: warning: process /usr/lib/postfix/smtpd pid 16040 exit status 1
Apr 23 20:25:52 ded21 postfix/master[15924]: warning: process /usr/lib/postfix/smtpd pid 16041 exit status 1