Howto implement virtual mailserver with MySQL, fetchmail, antivius, antispam

Discussion in 'Suggest HOWTO' started by sdb_231, Oct 23, 2008.

  1. sdb_231

    sdb_231 New Member

    Hello,

    I have been searching the net to find a solution for:

    I've a single e-mail account with my ISP ([email protected]) and I want to allow my family and friends to use this account individually ([email protected], [email protected], [email protected] etc. -- I have mydomain.com registered) using webmail interface like squirrelmail or egroupware. Spam and antivirus checking would be great but not really that important right now. They should be able to receive mails from "outside" directly into their individual mail box. (fetchmail? polling at regular intervals) They should be able to send mails "outside". When they send mail to family members ([email protected] ---> [email protected]) the mail is sent directly without being sent to the internet.

    I intend having a dedicated PC for this role (an old P4 with 512 Mb ram and 2 * 80 Gb IDE hard disks) always connected to the internet by broadband, my family members and friends have their individual desktops / laptops running operating systems of their preference.

    I have found the article "Virtual Users And Domains With Postfix, Courier, MySQL And SquirrelMail (Ubuntu 8.04 LTS)" at http://www.howtoforge.com/virtual-users-domains-postfix-courier-mysql-squirrelmail-ubuntu8.04 by Falko Timme quite near to my requirement but find integrating fetchmail into this difficult.

    Ideally, I would want all e-mails to be downloaded into one account ([email protected]) and then sent to individual accounts (original copy remains in [email protected]). Similarly, all outgoing mails are copied into another account ([email protected]) before being sent. Would also
    prefer to have all the users in MySQL and the mails stored in MySQL (if possible). Reason? It would simplify:

    a) mail backup (an SQL dump would back-up all mails and users)
    b) new user creation only in MySQL and not in system.
    c) Single fethcmail filter - I would not have to create individual fetchmail.rc filters. (only one that just forwards all mails to the incoming user (this probably would have to a "real" Linux user) and the MySQL does the job of mail distribution.
    d) users can manage their password and folders themselves.

    Though this is my preferred solution, I'm open to other options as well.

    Is it possible for you to compile a step-by-step tutorial and help me in this regard? Maybe, some extra hacks into the existing "Virtual Users And Domains With Postfix, Courier, MySQL And SquirrelMail (Ubuntu 8.04 LTS)" tutorial?

    Thank you for your time and my gratitude.
     
    Last edited: Oct 23, 2008
  2. falko

    falko Super Moderator Howtoforge Staff

    I'm not sure how to put all emails in one folder and then split the emails up...
     
  3. sdb_231

    sdb_231 New Member

    Thanks.

    I was wondering about your Howto and hacking it to an extent :)

    fetchmail all virtual user mails to vdamail (a real unix account for each virtual domain - we can replace the 'd' with the domain here - [vmydomainamail]) and then run some X-Envelope-To: based rules within Postfix. Is this possible?

    Postfix runs in Internet with Smarthost capability so that I'm able to use my ISP/WSP account to send mails.

    Thanks again.
     

Share This Page