Mail server - setup virtual mail boxes

Discussion in 'Server Operation' started by satimis, Feb 10, 2007.

  1. satimis

    satimis Member

    Hi folks,

    AMD Athlon54 X2 512Kx2 socket AM2 3800
    slamd64-11.0

    Just completed installing the captioned OS with everything installed except GAME. This is an experiment. slamd64 is now running on the box.

    I'm going to setup virtual mail boxes on this server, allowing my friends using the mail server sending and receiving mails. Please advise;

    1) how to check whether sendmail is running and configured properly.
    2) how to setup virtual mail boxes. Where can I find relevant tutorial.

    TIA


    B.R.
    satimis
     
  2. falko

    falko Super Moderator Howtoforge Staff

    You can run
    Code:
    netstat -tap
    to see if sendmail is running. Also check the mail log to see if there are problems.

    I don't know such a tutotirla for sendmail, only for Postfix. Why don't you use Postfix instead of sendmail? Postfix is easier to manage.
     
  3. satimis

    satimis Member

    Hi falko]

    Tks for your advice.

    $ netstat -tap
    Code:
    (Not all processes could be identified, non-owned process info
     will not be shown, you would have to be root to see it all.)
    Active Internet connections (servers and established)
    Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
    tcp        0      0 *:time                  *:*                     LISTEN     -
    tcp        0      0 *:submission            *:*                     LISTEN     -
    tcp        0      0 *:x11                   *:*                     LISTEN     -
    tcp        0      0 *:http                  *:*                     LISTEN     -
    tcp        0      0 *:auth                  *:*                     LISTEN     -
    tcp        0      0 *:domain                *:*                     LISTEN     -
    tcp        0      0 *:ipp                   *:*                     LISTEN     -
    tcp        0      0 *:smtp                  *:*                     LISTEN     -
    tcp        0      0 host.satimis.com:34873  63.150.131.35:http      ESTABLISHED3132/firefox-bin
    tcp        0      0 host.satimis.com:47681  jp-in-f99.google.c:http ESTABLISHED3132/firefox-bin
    tcp        0      0 host.satimis.com:47684  jp-in-f99.google.c:http ESTABLISHED3132/firefox-bin
    tcp        0      0 host.satimis.com:53864  63.150.131.26:http      ESTABLISHED3132/firefox-bin
    tcp6       0      0 *:x11                   *:*                     LISTEN     -
    tcp6       0      0 *:domain                *:*                     LISTEN     -
    tcp6       0      0 *:ssh                   *:*                     LISTEN     -
    
    # tail /var/log/maillog
    Code:
    Feb 11 08:09:33 host sm-msp-queue[2913]: starting daemon (8.13.8): queueing@00:25:00
    Feb 11 19:33:15 host sm-mta[2910]: starting daemon (8.13.8): SMTP+queueing@00:25:00
    Feb 11 19:33:15 host sm-msp-queue[2913]: starting daemon (8.13.8): queueing@00:25:00
    Feb 11 19:49:43 host sm-mta[3200]: l1BBnfPP003200: ruleset=check_rcpt, arg1=<[email protected]>, rela                   y=d137175.upc-d.chello.nl [213.46.137.175], reject=550 5.7.1 <[email protected]>... Relaying denied
    Feb 11 19:49:43 host sm-mta[3200]: l1BBnfPP003200: lost input channel from d137175.upc-d.chello.nl [21                   3.46.137.175] to MTA after rcpt
    Feb 11 19:49:43 host sm-mta[3200]: l1BBnfPP003200: from=<[email protected]>, size=0,                    class=0, nrcpts=0, proto=SMTP, daemon=MTA, relay=d137175.upc-d.chello.nl [213.46.137.175]
    Feb 11 20:11:45 host sm-mta[3448]: l1BC9PtG003448: [email protected], size=31, class=0, nrcpts=1,                    msgid=<[email protected]>, proto=ESMTP, daemon=MTA, relay=localhost [127.0.                   0.1]
    Feb 11 20:11:50 host sm-mta[3450]: l1BC9PtG003448: [email protected], delay=00:00:37, xdelay=00:00:                   05, mailer=esmtp, pri=120031, relay=e.mx.mail.yahoo.com. [216.39.53.1], dsn=2.0.0, stat=Sent (ok dirde                   l)
    Feb 11 21:37:51 host sm-mta[2910]: starting daemon (8.13.8): SMTP+queueing@00:25:00
    Feb 11 21:37:51 host sm-msp-queue[2913]: starting daemon (8.13.8): queueing@00:25:00
    
    I tried "telnet localhost 25" to send a mail to [email protected]. The said mail arrived without problem.


    slamd64-11.0 runs sendmail as default.

    $ ps aux | grep sendmail
    Code:
    root      2910  0.0  0.1  28068  2328 ?        Ss   21:37   0:00 sendmail: accepting connections      
    smmsp     2913  0.0  0.0  19308  1896 ?        Ss   21:37   0:00 sendmail: Queue runner@00:25:00 for /var/spool/clientmqueue
    satimis   3173  0.0  0.0   1184   400 pts/1    R+   21:44   0:00 grep sendmail
    
    $ ps ax | grep sendmail
    Code:
     2910 ?        Ss     0:00 sendmail: accepting connections
     2913 ?        Ss     0:00 sendmail: Queue runner@00:25:00 for /var/spool/clientmqueue
     3175 pts/1    R+     0:00 grep sendmail
    
    $ ps aux | grep postfix
    Code:
    satimis   3169  0.0  0.0   1184   400 pts/1    R+   21:43   0:00 grep postfix
    
    $ ps ax | grep postfix
    Code:
     3171 pts/1    R+     0:00 grep postfix
    
    B.R.
    satimis
     
  4. martinfst

    martinfst Member Moderator

    Don't know what you are trying to say, but you can not run both Postfix AND Sendmail on the same box without extensive tweaking and modifying either postfix or sendmail. It would be of little use either. Run only one MTA on your (production) systems. And run one MTA consistently, e.g. do not mix sendmail and postfix, other then for learning. Really, don't make it more complicated. Both Postfix and Sendmail require a significant amount of knowledge to run safely on the Internet now-a-days. By using only one flavor, you knowledge will grow more rapidly.
     
  5. satimis

    satimis Member

    Hi martinfst,

    I'm not prepared to run Sendmail and Postfix simultaneously on the same server. In response to falko's advice to run Postfix I tried to make it clear to him that Sendmail, being default MTA of slamd64, was already running. Postfix was not.

    B.R.
    satimis
     

Share This Page