need package to manage mail domains and accounts
I am migrating a site to a new server. The existing site has a few email accounts so I'm not concerned about copying the addresses or email from the old server. I'd like to start fresh.
That said, I'd like to install an admin package that will make it easy for me to: 1) Set up mail for the one domain I am hosting on this machine...maybe set up additional mail domains as necessary 2) create any mail accounts I need to create for any given domains 3) let users access their mail through a web interface like squirrelmail or SqWebMail or simliar. 4) let users access their mail through a mail client like outlook or thunderbird Can anyone help me accomplish this? I'm running CentOS 5 and I believe it has PostFix installed...I set up Apache/MySQL/PHP and some other stuff using a tutorial at howtoforge and it successfully sent mail from this php script: PHP Code:
|
If you are looking for some interface that has a gui, there are plenty. Sourceforge has quite a bit. Be cautious on what you install on a server that is exposed to the internet. That machine needs to be lean and free of unneeded packages and processes including X server.
I was wondering why you would want one? Everything you need to do is at your fingertips in a bash shell. By using ssh you can administer this quite easily. I would be happy to help you do this. Regards |
Thanks for your offer of help! I'm definitely curious about how to administer mail on linux via CLI but I'm not the only person who'll be administering email accounts. Ideally, it would be a web interface.
|
You may want to try this link:
http://www.postfix.org/docs.html I'll stress again the importance of not using an 'interface' on a server that is exposed to the internet. Administering users is very, very easy, in some cases just adding a system account will activate email for them. Read the man page: man useradd If there are several admins, then I suggest using sudo for each of them. That way there is accounting for who did what on the box. man sudo Keep the root password locked in a safe somewhere and only bring it out in an emergency. I am also thinking that some clear understanding of what you will be putting out there is in order. After that, what I am saying will make a little more sense. I hope I am helping. Regards |
I have used useradd in order to create FTP accounts before for designers to access the site. The man page says absolutely nothing about mail except there's an exit value related to it: 13 - can't create mail spool
How would I even know if a mail account is created? I know so very little about linux mail config. I appreciate your assistance but I'm still pretty far from accomplishing my goals which are: 1) Set up mail for the one domain I am hosting on this machine...maybe set up additional mail domains as necessary 2) create any mail accounts I need to create for any given domains 3) let users access their mail through a web interface like squirrelmail or SqWebMail or simliar. 4) let users access their mail through a mail client like outlook or thunderbird |
This is looking promising:
http://www.howtoforge.com/virtual_us..._clamav_centos I'm concerned about security though...anyone see any problem with these commands? Code:
groupadd vmail -g 1001 Code:
vmail ALL=(ALL) ALL |
It looks like you are taking a good step forward. You set the GID of the group, and users to that group. So far, the admin tasks are not very hard, right?
As for the rights on sudu, that is up to your security policy. Good link that you had also. Please report your progress Regards |
ok...after HOURS of fruitless effort, I think I have mail working. I was concerned about adding that user so I looked in /etc/passwd and LO AND BEHOLD i saw that dovecot was in there. i installed dovecot during the original setup howto without realizing what it was.
I started reading the postfix documentation and I just couldn't get my head around it so I broke down and installed postfix admin as instructed by this tutorial. Installing postfix admin was easy enough but when I tried adding some domains it had no impact whatsoever on the postfix configuration files. Postfix supports several approaches to maintaining user lists only one of which is a mysql database. The Postfix Admin I installed was making changes to a MySQL database that postfix knew nothing about. The nightmare part comes I realize that the default install of postfix offered by CentOS 5 via yum doesn't support mysql. I had to find out how to rebuild postfix from source. Post #5 in this thread on CentOs' site explains how that is done. I couldn't build it at first until I ran this to get the right packages: Code:
yum install db4-devel Code:
11.11.11.11 mydomain.com Code:
[root@server2 ~]# mail jason@mydomain.com Code:
Oct 19 03:03:34 server2 postfix/pickup[3714]: 8236450C055: uid=0 from=<root> Question 1: Is that 'passwd():unknown user supposed to be in there or do I have something wrongly configured? When I check the server using Thunderbird, i enter server2.mydomain.com as the server name and I enter my mailbox credentials without setting any security stuff yet. Checking the server for email works with this output in the log. Code:
Oct 19 02:30:57 server2 dovecot: auth(default): client in: AUTH 1 PLAIN service=POP3 lip=11.11.11.11 rip=22.22.22.22 resp= The last thing I've noticed is that when i deliberately send an email from CLI to a badly formed address, the mail server is unable to find the root email address to bounce the message: Code:
Oct 19 03:13:41 server2 postfix/pickup[3714]: 60D0950C057: uid=0 from=<root> |
I'm pretty impressed by your drive to make this happen. I was gently asking for you to really understand what it is you are configuring and you went well beyond.
Give yourself a pat on the back! You did right by making sure the logs spit out all it can, that makes the job easier. After Postfix behaves the way you want (notice: the way YOU want) then you can turn off debugging because you will fill up a partition quickly once this goes live. Lets start by looking at your Postfix conf file. Can you post that please. You may want ** out anything that is not for public viewing. I want to be sure we are on the same page and I understand exactly what you need. Also give mutt a try: man mutt It is a great email client. Good job. Regards |
My main.cf is pretty much the default which has everything commented out. I have attempted here to show only the configs that do anything by using
Code:
grep -P '^(?!#).+$' main.cf Code:
queue_directory = /var/spool/postfix Code:
[root@server2 postfix]# grep -P '^(?!#).+$' master.cf |
After ANOTHER ENTIRE DAY working on this, I have installed Amavis, ClamAV, and SpamAssassin on my server (thanks to this tutorial and it appears to be receiving mail on behalf of its hosted domains (in this case mydomain.com and server2.mydomain.com) from my desktop mail client (thunderbird). This has been *really* painful to implement. I still have Questions 1, 2, and 3 unanswered from above. Could someone please take a peek?
Today after compiling all that shiznit from source and installing everything, My server would deliver mail sent from CLI to the domains it hosts BUT would not allow mail to be delivered from the outside due to SASL failures. After I changed some dovecot config (wrong socket paths) I was still having that problem. the error in the log was: Code:
Oct 19 21:48:47 server2 postfix/smtp[3914]: 04BAA50C0AC: to=<jason@server2.mydomain.com>, relay=none, delay=3.1, delays=3.1/0.03/0/0, dsn=5.4.4, status=bounced (unable to look up host localhost: No address associated with hostname) Code:
content_filter = smtp-amavis:[localhost]:10024 Code:
content_filter = smtp-amavis:[127.0.0.1]:10024 I just sent myself the intentional spam test message mail from hotmail and the spam filter appears to be working. The resulting header information: Code:
Return-Path: <my_hotmail_address@hotmail.com> Question 4: Is there some config that will change that 'unknown' [127.0.0.1]' at the top to something more meaningful? Question 5: I want to change the spam settings so mail like this gets thrown the trash - NOT sent to some email address or folder somewhere. Would I change the amavis.conf or the spamassassin local.cf? Which params? Question 6: Can anyone think of a way for me to test ClamAV to see if virus scanning is also working? Question 7: I don't see spamd in my processes. Am I running an inefficient version? Is there a better way to set this up? |
To test ClamAV here it a good link:
http://flakshack.com/anti-spam/wiki/...ge=Test+ClamAV It seems that you are making progress quickly. Did you answer your questions above, or do you still need help? It took me a while to check back in. Regards, |
Thanks Ray. I don't feel like any of my questions have been answered yet. I therefore have 7 outstanding questions.
The commands they offer on that page simply don't work on my server. Chroot complains Code:
[root@server2 ~]# chroot -u amavisd /var/amavisd /usr/local/bin/clamscan -d /var/db/clamav Perhaps somewhat foolishly, I downloaded the fake virus files and disabled my desktop's virus scanning software so I could mail them to the new server. I'm shocked at how much I trust these online tutorials. I emailed all three files to my new server using thunderbird but they were intercepted by the mail exchange at the domain that hosts my usual email account. BAD: I logged in to jason@server.mydomain.com to the new server itself using squirrelmail and composed an email to myself. THE COM VIRUS WAS DELIVERED INTACT. THIS IS VERY BAD. WORSE: I logged in to the old server using squirrelmail, and attached the COM virus sample to an email sent to jason@server2.mydomain.com AND THE COM VIRUS WAS DELIVERED INTACT. What the heck? I don't even know where to begin with this problem. I've turned off the verbose debugging but this is the mail log for the delivery of the com virus sample from the original server to the new server. 99.99.99.99 represents the old server IP. 22.22.22.22 represents my desktop IP. Code:
Oct 21 17:34:29 server2 postfix/smtpd[22786]: connect from mydomain.mydoman.com[99.99.99.99] |
FYI, clamav appears to work properly and catch the viruses. I downloaded those test viruses and it catches them as it should:
Code:
[root@server2 clamtest]# clamscan ./ |
Sorry for the delay in getting back here. I had emergency surgery over the weekend. I should be able to look over your post soon.
Regards |
All times are GMT -5. The time now is 08:29 AM. |