Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I need to add rules to my mail server. I need to bcc an email address on outgoing and incoming emails for certain email accounts.

The first thing I need to do is to find out what mail server software I'm using! I have ssh access to our dedicated server, but everything was set up by the hosting company. Is there a way I can easily find out what mail server software I have running?

Then I need to configure it to add the rules. I guess that this will be different for all mail servers? Or is there a simple way to do it using ssh that is the de facto standard way of doing it?

Thank you.

In answer to sachin divecar:

tcp        0      0 0.0.0.0:25              0.0.0.0:*               LISTEN      5145/tcpserver  

In answer to steve (commenter):

Connected to mail.mysite.com.
Escape character is '^]'.
220 myhost.com ESMTP

Steve, I don't know what you've let yourself in for! :p

    1 ?        00:00:01 init
    2 ?        00:00:00 kthreadd
    3 ?        00:00:00 migration/0
    4 ?        00:00:03 ksoftirqd/0
    5 ?        00:00:00 watchdog/0
    6 ?        00:00:00 migration/1
    7 ?        00:00:06 ksoftirqd/1
    8 ?        00:00:00 watchdog/1
    9 ?        00:00:00 migration/2
   10 ?        00:00:03 ksoftirqd/2
   11 ?        00:00:00 watchdog/2
   12 ?        00:00:00 migration/3
   13 ?        00:00:04 ksoftirqd/3
   14 ?        00:00:00 watchdog/3
   15 ?        00:00:09 events/0
   16 ?        00:00:05 events/1
   17 ?        00:00:05 events/2
   18 ?        00:00:05 events/3
   19 ?        00:00:00 khelper
   54 ?        00:00:00 kblockd/0
   55 ?        00:00:00 kblockd/1
   56 ?        00:00:00 kblockd/2
   57 ?        00:00:00 kblockd/3
   60 ?        00:00:00 kacpid
   61 ?        00:00:00 kacpi_notify
  136 ?        00:00:00 kseriod
  193 ?        00:00:00 pdflush
  194 ?        00:00:27 pdflush
  195 ?        00:00:08 kswapd0
  238 ?        00:00:00 aio/0
  239 ?        00:00:00 aio/1
  240 ?        00:00:00 aio/2
  241 ?        00:00:00 aio/3
  884 ?        00:00:00 couriertls
 1441 ?        00:00:00 ksuspend_usbd
 1443 ?        00:00:00 khubd
 1458 ?        00:00:00 ata/0
 1459 ?        00:00:00 ata/1
 1460 ?        00:00:00 ata/2
 1461 ?        00:00:00 ata/3
 1462 ?        00:00:00 ata_aux
 1762 ?        00:00:00 scsi_eh_0
 1763 ?        00:00:00 scsi_eh_1
 2860 ?        00:00:00 scsi_eh_2
 3103 ?        00:00:39 kjournald
 3275 ?        00:00:00 udevd
 3685 ?        00:00:00 kpsmoused
 4775 ?        00:00:00 ntpd
 4776 ?        00:00:00 ntpd
 4990 tty4     00:00:00 getty
 4991 tty5     00:00:00 getty
 4993 tty2     00:00:00 getty
 4995 tty3     00:00:00 getty
 4997 ?        00:00:00 svscanboot
 4998 tty6     00:00:00 getty
 5110 ?        00:00:03 svscan
 5111 ?        00:00:00 readproctitle
 5112 ?        00:00:00 supervise
 5113 ?        00:00:00 supervise
 5114 ?        00:00:00 supervise
 5115 ?        00:00:00 supervise
 5116 ?        00:00:00 supervise
 5117 ?        00:00:00 supervise
 5118 ?        00:00:00 tcpserver
 5119 ?        00:00:02 tinydns
 5120 ?        00:00:00 multilog
 5121 ?        00:00:00 multilog
 5122 ?        00:00:00 supervise
 5123 ?        00:00:00 tcpserver
 5124 ?        00:00:00 multilog
 5125 ?        00:00:00 tcpserver
 5127 ?        00:00:00 supervise
 5128 ?        00:00:00 supervise
 5129 ?        00:00:00 supervise
 5131 ?        00:00:00 multilog
 5132 ?        00:00:08 qmail-send
 5133 ?        00:00:00 supervise
 5134 ?        00:00:00 run
 5135 ?        00:00:02 multilog
 5136 ?        00:00:00 supervise
 5137 ?        00:00:00 run
 5143 ?        00:00:00 supervise
 5145 ?        00:00:00 tcpserver
 5146 ?        00:00:00 supervise
 5148 ?        00:00:00 multilog
 5176 ?        00:00:02 qmail-lspawn
 5177 ?        00:00:00 qmail-rspawn
 5178 ?        00:00:02 qmail-clean
 5233 ?        00:00:00 acpid
 5240 ?        00:00:00 fghack
 5241 ?        00:00:00 fghack
 5242 ?        00:00:00 ald <defunct>
 5243 ?        00:00:00 ald <defunct>
 5244 ?        00:00:13 ald
 5262 ?        00:00:00 ald
 5309 ?        00:00:00 dd
 5311 ?        00:00:00 klogd
 5331 ?        00:00:00 sshd
 5388 ?        00:00:00 mysqld_safe
 5416 ?        00:07:06 mysqld
 5417 ?        00:00:00 logger
 5710 ?        00:01:47 clamd
 5811 ?        00:00:40 freshclam
 5826 ?        00:00:00 courierlogger
 5827 ?        00:00:00 authdaemond
 5842 ?        00:00:00 courierlogger
 5843 ?        00:00:00 couriertcpd
 5846 ?        00:00:03 authdaemond
 5847 ?        00:00:03 authdaemond
 5864 ?        00:00:00 courierlogger
 5865 ?        00:00:00 couriertcpd
 5878 ?        00:00:00 courierlogger
 5879 ?        00:00:00 couriertcpd
 5898 ?        00:00:00 courierlogger
 5899 ?        00:00:00 couriertcpd
 5977 ?        00:00:00 xinetd
 5999 ?        00:00:00 atd
 6010 ?        00:00:01 cron
 6093 ?        00:00:22 apache2
 6268 tty1     00:00:00 getty
 6356 ?        00:00:00 dd
 6361 ?        00:00:00 cron
 6395 ?        00:00:02 syslogd
 6398 ?        00:00:01 sshd
 6426 ?        00:00:00 mysqld_safe
 6468 ?        00:30:46 mysqld
 6469 ?        00:00:00 logger
 6471 ?        00:00:45 apache2
 8092 ?        00:00:00 apache2
 8435 ?        00:00:00 apache2
 8438 ?        00:00:00 apache2
 8492 ?        00:00:00 pure-ftpd-mysql
 9017 ?        00:00:00 imapd
 9019 ?        00:00:00 gam_server
 9234 ?        00:00:00 apache2
 9741 ?        00:00:00 pure-ftpd-mysql
 9742 ?        00:00:00 pure-ftpd-mysql
 9792 ?        00:00:00 sshd
 9794 pts/0    00:00:00 bash
 9805 pts/0    00:00:00 ps
16916 ?        00:00:00 apache2
16917 ?        00:00:00 mapssl
16987 ?        00:00:00 syslogd
17527 ?        00:01:52 python
share|improve this question
    
sometimes the welcome banner says what server is running "telnet mail.somehost.com 25" should show you the banner –  Shutupsquare Dec 9 '11 at 13:25
    
Hey steve, I telnet'd and have posted the output above. Would this imply ESMTP? Thanks –  Thomas Clayson Dec 9 '11 at 16:16
    
no that just the protocol, their not advertising what SMTP server is running in the banner, post the output of "ps -A" –  Shutupsquare Dec 9 '11 at 16:32
    
502 unimplemented (#5.5.1)... not looking good I guess? :p haha –  Thomas Clayson Dec 9 '11 at 16:55
    
you need to run that from the command line, not in the telnet session. –  Shutupsquare Dec 9 '11 at 16:57
show 4 more comments

1 Answer 1

up vote 2 down vote accepted

Answer to your first question.

netstat -lntp | fgrep ':25'

You can get the process running as smtp server in the last column of the output of the above command. Post this output, then we can discuss further.

As it is tcpserver, most probably you are using qmail. I have never used Qmail but I can give you some instruction after googling for sometime.

Qmail provides the ability to make a copy of each email that flows through the system. This is done using the QUEUE_EXTRA code. See Qmail FAQ.

You may need to install qmail patch named tap which adds this additional functionality to qmail to create control rules to make automatic cc/bcc of mails.

share|improve this answer
    
Hey sachin, thanks for this, I've done that and posted the output above. –  Thomas Clayson Dec 9 '11 at 16:17
    
@ThomasClayson I have updated the answer. –  Sachin Divekar Dec 9 '11 at 17:07
    
Ah genius! Thank you very much for the help and the info (and for googling for me!) –  Thomas Clayson Dec 9 '11 at 17:23
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.