Email set up

I tried running yum update on my VirtualMin machine today. Afterwards I could not see Web sites, email or access SSH - so I started over with a clean install on Centos 5.3

The Web sites work perfectly with no messing. The same is not true of email.

I remember from the last time I (successfully) set up a new environment in Virtualmin that there are many 'hoops' to jump through in terms setting up email. Stupidly I didn't make a note of the hoops.

I created an email address: support@formatclick.com

When I send a message to it, I get:

This message was created automatically by mail delivery software. A message that you sent could not be delivered to one or more of its recipients. This is a permanent error. The following address(es) failed: support@formatclick.com No Such User Here ------ This is a copy of the message, including all the headers. ------ Return-path: martyn.whittaker@billyfire.com Received: from ip72-197-223-109.sd.sd.cox.net ([72.197.223.109] helo=[192.168.0.102]) by amazing.billyfire.com with esmtpa (Exim 4.69) (envelope-from martyn.whittaker@billyfire.com) id 1N5YnB-0001pU-Sn for support@formatclick.com; Tue, 03 Nov 2009 21:52:02 -0800 Message-ID: 4AF10878.4040906@billyfire.com Date: Tue, 03 Nov 2009 20:52:08 -0800 From: "martyn.whittaker@billyfire.com" martyn.whittaker@billyfire.com User-Agent: Thunderbird 2.0.0.23 (Windows/20090812) MIME-Version: 1.0 To: support@formatclick.com Subject: Test Content-Type: multipart/alternative; boundary="------------030901010007040003020904" This is a multi-part message in MIME format. --------------030901010007040003020904 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit -- Type message here.

When I try and pop my email I get the:

"Sending of password did not succeed. Mail server mail.formatclick.com responded: Authentication failed"

I tried popping the mail with user name support and user name support@formatclick.com with the same result.

When I try to access Virtualmin Email FAQ (http://www.virtualmin.com/documentation/id,frequently_asked_questions/do...) I get a Page not found The requested page could not be found. error

Best regards,

Martyn

Status: 
Active

Comments

Joe's picture
Submitted by Joe on Tue, 11/03/2009 - 23:34 Pro Licensee

Email FAQ is here: http://www.virtualmin.com/documentation/email/faq

And the email troubleshooting guide is here: http://www.virtualmin.com/documentation/email/troubleshooting

Where did you find that broken link?

If you are using @ in the username, you have to enable support for that format in saslauthd. That's documented here:

http://www.virtualmin.com/documentation/email/faq#what_s_the_deal_with_i...

I started the troubleshooting process.

var/log/maillog

includes the following, over and over:

Nov 4 16:27:19 li46-122 postfix/master[7044]: warning: process /usr/libexec/postfix/smtpd pid 13574 exit status 1 Nov 4 16:27:19 li46-122 postfix/master[7044]: warning: /usr/libexec/postfix/smtpd: bad command startup -- throttling Nov 4 16:28:19 li46-122 postfix/smtpd[13621]: fatal: open database /etc/aliases.db: No such file or directory

I'm thinking this might be the problem. But how to fix it? I have not knowingly made any changes to the Virtualmin default settings. I checked and there does nt seem to be any /etc/aliases.db

You may want to run the command newaliases to create the aliases DB that Postfix is complaining about ..

Hi, It appears to be working now.

This is what I did:

ran postmap /etc/postfix/virtual /etc/init.d/postfix restart

Changed email user name from 'user' to 'user@domain.com' using VIRTUALMIN, System Settings - Server Templates - Default Settings -

Edited /etc/sysconfig/saslauthd changed FLAGS= to FLAGS=r

ran newaliases

I may have done more than I needed? But it seems to work now.

Regards,

Martyn

That sounds good to me.

We will be updating the installer to run those newaliases and postmap commands, as oddly some systems don't have valid Postfix DB files by default..

Joe's picture
Submitted by Joe on Wed, 11/04/2009 - 13:45 Pro Licensee

It sounds like you've gotten it straightened out. Interesting that the aliases map hadn't been generated. It's usually automatically handled by both Virtualmin and Postfix...it's pretty hard to end up in a situation where it doesn't exist.

Anyway, feel free to re-open this ticket is problems pop up again.

Thank you.

I just noticed something really strange.

If I send an email via Google, it appears nicely in the Postfix logs, thus:

Nov 4 21:08:10 li46-122 postfix/smtpd[17619]: connect from mail-bw0-f220.google.com[209.85.218.220] Nov 4 21:08:11 li46-122 postfix/smtpd[17619]: 07F092E547: client=mail-bw0-f220.google.com[209.85.218.220] Nov 4 21:08:11 li46-122 postfix/cleanup[17622]: 07F092E547: message-id=4AF1ED32.5030606@markplex.com Nov 4 21:08:11 li46-122 postfix/qmgr[17309]: 07F092E547: from=martyn.whittaker@markplex.com, size=4800, nrcpt=1 (queue active)

I can then pop it from my account (mail.formatclick.com). It works perfectly

However if I send an email via the Cox smtp server, or from one of my other SMTP servers running on another machine, nothing appears in the Postfix log and a few minutes later I get the email bounced with the following message:

This message was created automatically by mail delivery software.

A message that you sent could not be delivered to one or more of its recipients. This is a permanent error. The following address(es) failed:

support@formatclick.com No Such User Here

------ This is a copy of the message, including all the headers. ------

Return-path: sales@billyfire.com Received: from ip72-197-223-109.sd.sd.cox.net ([72.197.223.109] helo=[192.168.0.102]) by amazing.billyfire.com with esmtpa (Exim 4.69) (envelope-from sales@billyfire.com) id 1N5o0L-0006d2-Ub for support@formatclick.com; Wed, 04 Nov 2009 14:06:38 -0800 Message-ID: 4AF1ECE1.3080800@billyfire.com Date: Wed, 04 Nov 2009 13:06:41 -0800 From: "sales@billyfire.com" sales@billyfire.com User-Agent: Thunderbird 2.0.0.23 (Windows/20090812) MIME-Version: 1.0 To: support@formatclick.com Subject: BillyFire server Content-Type: multipart/alternative; boundary="------------080000020500020606090106"

Any ideas?

Joe's picture
Submitted by Joe on Wed, 11/04/2009 - 16:59 Pro Licensee

If nothing appears in the log then the message never reached your server; the bounce is not coming from your Virtualmin system.

I would suspect DNS issues. Check to be sure the MX record is correct coming from all of the nameservers specified at your registrar and in your NS records.

You were right. It wasn't getting to the server.

I was sending from another server and formatclick.com was in /etc/localdomains rather than /etc/remotedomains, consequently email sent from that server was looking for a support@formatclick.com on the local server rather than my new Virtualmin server. I suppose everything has a logical answer. I chnaged this on my other server and now thinsg are fine. Now to do battle with getting the server to send email...

Should read:

FLAGS=-r

Hello All,

Thank you for posting this information. It was very useful to solve my similar problem. I just built a new CentOS 5.4 box and was having the same issue with mail not coming through. I ran through the step in Comment #5 and it seemed to resolve the issue. A question I have though is that after running the command, I get the following warning messages:

postmap: warning: /etc/init.d/postfix.db: duplicate entry: "." postmap: warning: /etc/init.d/postfix.db: duplicate entry: "[" postmap: warning: /etc/init.d/postfix.db: duplicate entry: "[" postmap: warning: /etc/init.d/postfix.db: duplicate entry: "[" postmap: warning: /etc/init.d/postfix, line 32: expected format: key whitespace value postmap: warning: /etc/init.d/postfix, line 34: expected format: key whitespace value postmap: warning: /etc/init.d/postfix, line 45: expected format: key whitespace value postmap: warning: /etc/init.d/postfix, line 55: expected format: key whitespace value postmap: warning: /etc/init.d/postfix, line 63: expected format: key whitespace value postmap: warning: /etc/init.d/postfix, line 68: expected format: key whitespace value postmap: warning: /etc/init.d/postfix, line 73: expected format: key whitespace value postmap: warning: /etc/init.d/postfix, line 78: expected format: key whitespace value postmap: warning: /etc/init.d/postfix, line 84: expected format: key whitespace value postmap: warning: /etc/init.d/postfix, line 118: expected format: key whitespace value

Are these anything to be concerned about? Thanks for your help!

Nathan Allen

Sounds like you may have run the command in step 5 wrong due to incorrect line wrapping - it should really be :

postmap /etc/postfix/virtual
/etc/init.d/postfix restart

Thanks Jamie! That worked much better this time around. I'm still learning linux command lines and missed that in the formatting of the line. I appreciate your quick response. Have a good evening.