Difference between revisions of "Mail Systems"

From Alessandro's Wiki
Line 36: Line 36:


== postfix ==
== postfix ==
* enabling SMTP relay:
Restriction list name Status Effect of REJECT or DEFER result
smtpd_client_restrictions Optional Reject all client commands
smtpd_helo_restrictions Optional Reject HELO/EHLO information
smtpd_sender_restrictions Optional Reject MAIL FROM information
smtpd_recipient_restrictions Required Reject RCPT TO information
smtpd_data_restrictions Optional Reject DATA command
smtpd_end_of_data_restrictions Optional Reject END-OF-DATA command
smtpd_etrn_restrictions Optional Reject ETRN command


== mailman ==
== mailman ==

Revision as of 11:07, 9 July 2011


exim

commands

  • see the queue:
mailq
    • or
exim -bp

the output shows the message queue giving useful information to work with it:

root@lingua:~# mailq
24h   379 1QC8cA-0001iy-B3 <ciaotest@server.company.n>
          hellobye@server.company.nl
  • 1QC8cA-0001iy-B3
    message ID (corresponds to a filename)
    24h
    time msg spent in the queue
    379
    the size in bytes.
  • find a queued message:
find /var/spool/ -name "1QC8cA-0001iy-B3*"
  • to un-queue messages, I delete the files found by the find command (to rude maybe?)... it works
  • flush the queue:
runq
  • or
exim -q
    • flush queue forcing frozen messages to be sent
exim -qf 
    • flush queue forcing frozen/non-frozen messages to be sent
exim -qff

postfix

  • enabling SMTP relay:
Restriction list name 	Status 	Effect of REJECT or DEFER result
smtpd_client_restrictions 	Optional 	Reject all client commands
smtpd_helo_restrictions 	Optional 	Reject HELO/EHLO information
smtpd_sender_restrictions 	Optional 	Reject MAIL FROM information
smtpd_recipient_restrictions 	Required 	Reject RCPT TO information
smtpd_data_restrictions 	Optional 	Reject DATA command
smtpd_end_of_data_restrictions 	Optional 	Reject END-OF-DATA command
smtpd_etrn_restrictions 	Optional 	Reject ETRN command

mailman

  • show all lists
/var/lib/mailman/bin/list_lists
  • show pending messages
/var/lib/mailman/bin/show_qfiles /var/lib/mailman/qfiles/shunt/*.pck
  • re-queque shunted messages
/var/lib/mailman/bin/unshunt
# on another terminal
tail -f /var/log/mail.log
  • find the parent list of an address:
 for lista in `/usr/lib/mailman/bin/list_lists -b`; do  /usr/lib/mailman/bin/list_members $lista|grep <indirizzo> && echo $lista; done