How to do virtual mail hosting with sendmail?
• Make sure that you have the cw feature enabled in the M4 macro that you use to generate your .cf file: FEATURE(use_cw_file) • Make sure the domain you want to answer mail for is in the .cw file (the default location is in /etc/sendmail.cw) virtualdomain.com Actually, this step may not strictly be necessary. If virtualdomain.com resolves to an IP address which is assigned to the server, sendmail will answer mail for that domain even if it isn’t in the sendmail.cw file (unless you’re running >= 8.8.8 and have disabled that feature), but it’s best to add it just to be sure. • Make sure the virtual-user table is in the M4 file: FEATURE(virtusertable, btree /etc/virt_mail) In this example I use a btree database file. dbm and hash may also be available on your system. • Create the virtual mail table — /etc/virt_mail in this case: someone@virtualdomain.com local_user_1 @virtualdomain.com local_user_2 The first line maps someone@virtualdomain.com to local_user_1. The second line directs all