Need help setting up sendmail with virtual accounts
Hi all
I am in the unfortunate position to migrate existing mail accounts from a qmail server to sendmail - yes, I know that's crazy but it seems that we absolutely need to deploy sendmail, as it is required by our newsletter program. To begin with, I don't have the slightest idea how to set up sendmail to deliver incoming mails to virtual accounts. To make this a bit clearer, here's our current directory structure, used by qmail in conjunction with vpopmail: Code:
/ Can anyone so much as point me in the right direction? What do I need to employ? Can something like that be achieved with procmail? I've googled extensively but I either used the wrong keywords or sendmail is used so rarely nowadays that there really isn't much information available anymore. Thanks in advance! edderkop |
Here is some help
EdderKop:
Please take this reply as just a direction to look into. I trust you know the proper way to setup the sendmail configuration file(/etc/mail/sendmail.cf) is to use a macro file first, normally sendmail.mc, and "compile" it(probably not the right terminology) with the "m4" utility. Well ... Include this line into your macro file(your ".mc" file): FEATURE(`virtusertable')dnl This will configure sendmail to look into the virtual users database file, normally found at /etc/mail/virtusertable.db. In this directory there is a similar file named virtusertable, which can be edited. I think you would include virtual users here, once done just run: "makemap hash /etc/mail/virtusertable < /etc/mail/virtusertable" which will append your new entries into the database file. Check this link: http://www.sendmail.org/tips/virtualHosting |
Hi EdderKop
I'm going to assume you already have the emails created. What I will suggest for migration is to use imapsync (http://freshmeat.net/projects/imapsync/). Email migration used to be a real PITA for me until I discovered this tool. I have used it to migrate from postfix to qmail, from postfix to zimbra and qmail to zimbra. Best way to do is to install it on another linux server and run some simple commands and everything will get moved. I'm not sure about sendmail (although I think its close to postfix), but postfix had emails all stored in a single file while qmail has it all seperated. Of course none of this is a concern imapsync. Its the best way I've found. There probably is a better way but I don't know of any so far. |
Hi darvil
Quote:
Thanks for your suggestion! :-) |
Quote:
|
I've been playing around with the virtusertable and the possibilities it provides to map several user names or domains to one account are nice and will certainly come in handy but it's unfortunately still not what I'm looking for (or I am missing something). Is there a possibility to use not actual system accounts to have mail delivered to but subdirectories, as lined out in the directory tree above? So, a mail that is addressed to johndoe@example.com would with my present configuration go to the Maildir in the home directory /home/johndoe (i.e. /home/johndoe/Maildir). With the virtusertable I can configure sendmail in such a way, that mail for, say, johnny.doe@example.com is delivered to johndoe, too. I want, however, to gather all the mailings under one single account called, say, mail. The directory structure I envisage should look something like the following:
Code:
/home/mail/ Any ideas? |
If this is proving difficult, perhaps you should consider altering your newsletter program? If it's written in PHP, I might be able to help you figure that out.
|
Quote:
Unfortunately my boss won't have it. I begin to wonder, though, if I should not just tell her to forget the whole thing, that it's just not possible to get that trash to work or worth spending any more time on. :rolleyes: |
procmail
I wonder if procmail can help you? I know it can be configured to redirect messages to other folders, users, even pipe them through programs. Perhaps a good mix of sendmail virtualuser table and procmail recipes?
|
Make sure you check procmail's site here: http://www.procmail.org/. The mailing-lists are phenomenal, I use them every so often.
|
Thanks for your suggestion, amonamarth. The use of procmail sounds reasonable and should in fact be feasible if I can parse out the domain and user parts from the recipient address. Fortunately, I've already set up sendmail to use procmail, so that mail is delivered into Maildirs instead of the default mbox format. So, I'd just need to figure out the correct rulesets. I'll look into this next. Thanks! :)
|
All times are GMT -5. The time now is 07:49 PM. |