Setting up email

21 posts / 0 new
Last post
#1 Sun, 12/07/2008 - 22:38
wesleyh

Setting up email

Hello,

I simply want the email address info@domain.com for each virtual host I set up. However, I see that the defaul is username@domain.com -- how can I change this?

I also want to remove all aliases since I want just 1 email address, but it doesn't let me. Why?

Also, where can I change the password for email? Is it not possible to have this different from my ftp pw?

Mon, 12/08/2008 - 05:48
andreychek

Well, you can't change the name of the accounts it creates by default.

You can, however, add aliases for that account.

So username@domain.com will still be the account name -- but in the Server Templates under Mail for Domain, you can setup any number of aliases (such as "info") to be associated with that account.
-Eric

Mon, 12/08/2008 - 08:11 (Reply to #2)
wesleyh

Ok, I have done that, but I dont seem to be receiving the email. (I'm just using "read user mail" at the moment)

I don't get any email notification that it's failed so I don't know what's going on.

Mon, 12/08/2008 - 08:41 (Reply to #3)
andreychek

Well, first, I'd go into Edit Mail Aliases for the domain in question and verify that the correct aliases are listed.

Second, I'd view the email logs and see what sort of errors, if any, show up when sending an email to that account.

The email logs are generally either in /var/log/mail.log or /var/log/maillog.
-Eric

Tue, 12/09/2008 - 06:28 (Reply to #4)
wesleyh

Unfortunately the site is already live, I've checked the install.sh source code but don't see much mention of postfix. Or are you using a special prepackaged rpm to install this?

I wanted to check the install.sh to see if perhaps the commands I needed to do were in the source code, but alas, they are not.

Also, since people can install virtualmin after the fact, perhaps there should be a config checker of some sort? Or is that there already? Something that checks and makes sure everything is compatible with web/virtualmin.

Sun, 06/07/2009 - 07:33 (Reply to #5)
andreychek

Well, I can't guarantee this will work at all, as I don't know what isn't setup on your machine -- however, below are the contents of a /etc/procmailrc file from a Virtualmin GPL install I have:

[code:1]
LOGFILE=/var/log/procmail.log
TRAP=/etc/webmin/virtual-server/procmail -logger.pl
:0wi
VIRTUALMIN=|/etc/webmin/virtual-server/lookup-domain.pl $LOGNAME
:0
* ?/usr/bin/test "$VIRTUALMIN" != ""
{
INCLUDERC=/etc/webmin/virtual-server/procmail/$VIRTUALMIN
}
DEFAULT=$HOME/Maildir/
ORGMAIL=$HOME/Maildir/
DROPPRIVS=yes
:0
$DEFAULT
[/code:1]

Thu, 12/11/2008 - 09:27 (Reply to #6)
wesleyh

Hi, it works! :) I can see it in my /home/ dir.

But is it normal that when I go to webmin > servers > read user mail that it only shows /var/mail/username instead of /home/username/mail ?

Thu, 12/11/2008 - 09:49 (Reply to #7)
wesleyh

Hmm, I've now connected via pop, are there special settings for dovecot as well since it doesn't retrieve any emails ?

Thu, 12/11/2008 - 21:58 (Reply to #8)
wesleyh

Read user email is still using the old /var/mail/username location though.

Fri, 12/12/2008 - 01:50 (Reply to #9)
Joe
Joe's picture

<div class='quote'>Read user email is still using the old /var/mail/username location though.</div>

Also configurable. Webmin:Usermin Configuration:Usermin Module Configuration:Read Mail

I tend to prefer to use the IMAP mode...which puts all file access of to the IMAP server (meaning Usermin doesn't have to care where mail spools live), but you can configure it to access Maildir directly, as well.

--

Check out the forum guidelines!

Mon, 12/08/2008 - 08:50
wesleyh

Here's the tail from maillog:

=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (Ok: queued as 2B1146581A4)
Dec 8 20:33:08 server postfix/local[9688]: 2B1146581A4: to=&lt;root@mysite.com&gt;, relay=local, delay=0.05, delays=0.04/0/0/0, dsn=2.0.0, status=sent (delivered to mailbox)
Dec 8 20:33:08 server postfix/qmgr[3264]: 2B1146581A4: removed
Dec 8 20:33:08 server postfix/smtpd[9684]: disconnect from mysite.com[127.0.0.1]
Dec 8 20:33:08 server sendmail[9710]: mB92X8V9009710: from=root, size=343, class=0, nrcpts=1, msgid=&lt;200812090233.mB92X8V9009710@mysite.com&gt;, relay=root@localhost
Dec 8 20:33:08 server postfix/smtpd[9684]: connect from mysite.com[127.0.0.1]
Dec 8 20:33:08 server postfix/smtpd[9684]: 3BECD6581A4: client=mysite.com[127.0.0.1]
Dec 8 20:33:08 server postfix/cleanup[9687]: 3BECD6581A4: message-id=&lt;200812090233.mB92X8V9009710@mysite.com&gt;
Dec 8 20:33:08 server postfix/qmgr[3264]: 3BECD6581A4: from=&lt;root@mysite.com&gt;, size=895, nrcpt=1 (queue active)
Dec 8 20:33:08 server sendmail[9710]: mB92X8V9009710: to=root, ctladdr=root (0/0), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30343, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (Ok: queued as 3BECD6581A4)
Dec 8 20:33:08 server postfix/local[9688]: 3BECD6581A4: to=&lt;root@mysite.com&gt;, relay=local, delay=0.05, delays=0.04/0/0/0, dsn=2.0.0, status=sent (delivered to mailbox)
Dec 8 20:33:08 server postfix/qmgr[3264]: 3BECD6581A4: removed
Dec 8 20:33:08 server postfix/smtpd[9684]: disconnect from mysite.com[127.0.0.1]
Dec 8 20:49:42 server sendmail[9945]: mB92ngmp009945: from=root, size=314, class=0, nrcpts=1, msgid=&lt;200812090249.mB92ngmp009945@mysite.com&gt;, relay=root@localhost
Dec 8 20:49:42 server postfix/smtpd[9946]: connect from mysite.com[127.0.0.1]
Dec 8 20:49:42 server postfix/smtpd[9946]: 4E9376581A4: client=mysite.com[127.0.0.1]
Dec 8 20:49:42 server postfix/cleanup[9949]: 4E9376581A4: message-id=&lt;200812090249.mB92ngmp009945@mysite.com&gt;
Dec 8 20:49:42 server postfix/qmgr[3264]: 4E9376581A4: from=&lt;root@mysite.com&gt;, size=863, nrcpt=1 (queue active)
Dec 8 20:49:42 server sendmail[9945]: mB92ngmp009945: to=root, ctladdr=root (0/0), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30314, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (Ok: queued as 4E9376581A4)
Dec 8 20:49:42 server postfix/smtpd[9946]: disconnect from mysite.com[127.0.0.1]
Dec 8 20:49:42 server postfix/local[9950]: 4E9376581A4: to=&lt;root@mysite.com&gt;, relay=local, delay=0.06, delays=0.05/0/0/0, dsn=2.0.0, status=sent (delivered to mailbox)
Dec 8 20:49:42 server postfix/qmgr[3264]: 4E9376581A4: removed

I use postfix. , but I see some sendmail in there. Might that be the problem?

Actually, I don't think I see any mention of the test email that I sent. All emails seem to beto root@mysite.com, not info@mysite.com .. hmmm

PS: Thanks for your help.

Mon, 12/08/2008 - 14:24 (Reply to #11)
andreychek

Mmm, well, that's a little odd... so just to be sure -- you're certain you emailed the info@ address, and you don't see references to info@ in the logs anyone above or below the section you listed here?

What does this command show:

grep mailbox_command /etc/postfix/main.cf

On mine, I get this:

mailbox_command = /usr/bin/procmail-wrapper -o -a $DOMAIN -d $LOGNAME

Thanks,
-Eric

Mon, 12/08/2008 - 22:08
wesleyh

Hi,

Yes, I'm sure I sent it to the correct address and the alias is correct. I even sent an email to username@domain.com with no luck.

About the conf file, well, there isn't an uncommented line with such a statement.

I added the line, but used /usr/bin/procmail instead of procmail-wrapper since I couldn't find that file on my system, is that ok?

After restarting postfix, and trying again, I still do not receive an email, and no mention is in the maillog.

Tue, 12/09/2008 - 04:21 (Reply to #13)
andreychek

Mmm, well, the mailbox_command line in main.cf is part of what the Virtualmin installer sets up when doing an install.

That makes me wonder if perhaps you installed a different way, or maybe the installer didn't finish correctly.

Do you recall how you went about installing Virtualmin? Also, which Virtualmin version are you using, and what distro/version do you have?
-Eric

Tue, 12/09/2008 - 05:49
wesleyh

I probably should have mentioned this earlier, I'm using the free version.

Apache/php/mysql/postfix/dovecot were first installed via yum.

Only then have I installed webmin via rpm and then added the virtualmin module.

I'm using centos 5.2

Is there anything else that should be in the config file or?

Tue, 12/09/2008 - 06:07 (Reply to #15)
andreychek

Aha! Well, using the GPL version there is fine, however, I think I understand where the issue is now.

There's actually quite a bit of work involved in setting up a fully functional Virtualmin system -- and it's all hidden from you by Joe's wonderful installer (the install.sh), available here:

http://webmin.com/vinstall.html

Without that, there's going to be a few things that don't make it onto your system that should be there, and a few other things on your system that aren't tweaked quite right.

Is your setup live yet? Is there any chance you could start over and run the installer, which should fix all sorts of things and make life much easier?
-Eric

Thu, 12/11/2008 - 08:05
wesleyh

Ok, I am now able to get an error back:

In my maillog:

Dec 11 20:04:20 server postfix/smtpd[30958]: connect from nelson.telenet-ops.be[195.130.xx.xx]
Dec 11 20:04:20 server postfix/smtpd[30958]: 70F166581AD: client=nelson.telenet-ops.be[195.130.xx.xx]
Dec 11 20:04:20 server postfix/cleanup[30961]: 70F166581AD: message-id=&lt;9A545F72-69B0-4500-8E74-A3E672A2AE04@homeemail.be&gt;
Dec 11 20:04:20 server postfix/qmgr[30305]: 70F166581AD: from=&lt;info@homeemail.be&gt;, size=1063, nrcpt=1 (queue active)
Dec 11 20:04:20 server postfix/smtpd[30958]: disconnect from nelson.telenet-ops.be[195.130.133.66]
Dec 11 20:04:20 server postfix/local[30962]: 70F166581AD: to=&lt;domain@server.domain.com&gt;, orig_to=&lt;domain@domain.com&gt;, relay=local, delay=0.12, delays=0.11/0/0/0.01, dsn=5.2.0, status=bounced (can't create user output file. Command output: procmail: Couldn't create &quot;/var/mail/domain&quot; )
Dec 11 20:04:20 server postfix/cleanup[30961]: 8E5A26581B6: message-id=&lt;20081212020420.8E5A26581B6@server.domain.com&gt;
Dec 11 20:04:20 server postfix/qmgr[30305]: 8E5A26581B6: from=&lt;&gt;, size=3148, nrcpt=1 (queue active)
Dec 11 20:04:20 server postfix/bounce[30964]: 70F166581AD: sender non-delivery notification: 8E5A26581B6
Dec 11 20:04:20 server postfix/qmgr[30305]: 70F166581AD: removed

In return mail:

&lt;username@server.domain.com&gt; (expanded from
&lt;info@domain.com&gt;): can't create user output file. Command output:
procmail: Couldn't create &quot;/var/mail/username&quot;
Reporting-MTA: dns; server.domain.com

So, I checked /var/mail and indeed, there are no folders created for my users. Do you know what could have caused this?

Thu, 12/11/2008 - 08:40 (Reply to #17)
andreychek

Yeah, looks like it's trying to deliver to the wrong place. It should be trying to put that in $HOME, not /var/mail.

What does your /etc/procmailrc look like? And you still have main.cf setup to use procmail to deliver email, right?

In regards to your previous post -- somewhere along the way, Virtualmin makes modifications to Postfix's main.cf that you don't seem to have. I'm not sure where that's all setup though.

It also handles setting up Procmail, Dovecot, Spamassassin, ClamAV, the related CRON jobs, and the like.

Joe's been hard at work on an improved installer, and it probably wouldn't be hard to get it to handle configuration checks as you mentioned.

Unfortunately, it's not quite ready yet :-)

Anyhow, in your case, I suspect procmail isn't configured to deliver email to the user home directories.
-Eric

Thu, 12/11/2008 - 08:55
wesleyh

Yes, I still have

mailbox_command = /usr/bin/procmail -o -a $DOMAIN -d $LOGNAME
and
virtual_alias_maps = hash:/etc/postfix/virtual

in mail.cf

However, I don't see any /etc/procmailrc, that does not exist. What is that supposed to be? I do have

[root@server postfix]# locate procmail
/etc/webmin/procmail
/etc/webmin/procmail/config
/usr/bin/procmail
/usr/libexec/webmin/procmail
/usr/libexec/webmin/blue-theme/procmail
/usr/libexec/webmin/blue-theme/procmail/images
/usr/libexec/webmin/blue-theme/procmail/images/icon.gif
/usr/libexec/webmin/blue-theme/spam/images/procmail.gif
/usr/libexec/webmin/caldera/procmail

etc..

That /etc/webmin/procmail/config has:

procmail=procmail
procmailrc=/etc/procmailrc
includes=0

Thu, 12/11/2008 - 21:56
wesleyh

Never mind mate, got it working :)

Go to dovecot &gt; mail files for anyone who has this issue and choose the right location there (and also choose a UIDL format)

Thanks for all your help :)

Sat, 12/13/2008 - 08:25
wesleyh

Thanks, everything is working now :)

Topic locked