parsed.org

Tips by tag: mta

Alias File by xinu on Sep 10, 2005 12:17 AM

Instead of poluting your otherwise pristine aliases file, include larger files using this syntax:

all_users: ":include:/filename"

This will allow you to email all_users@localhost and get all the users in the referenced file.

aliasesconfigurationmailmtasendmailserversyntax
Flush Queue by xinu on Mar 16, 2005 12:02 PM

To force it to run through the queue (again), you can run:

# ${PATH_TO_POSTFIX}/postfix flush
commandsconfigurationmailmtapostfixqueueserver
Sendmail Aliases by xinu on Jun 09, 2005 02:32 PM

If you have a system that might be changing versions multiple times you might orphan some of the lateral utilities (like newaliases). If you want to be certain that you're rehashing the correct aliases file (the one that sendmail.cf is referencing), run sendmail with the -bi option like this:

# /path/to/sendmail -bi
aliasescommandsmailmtanewaliasessendmailsendmail.cfserver
Standalone Procmail by xinu on Sep 10, 2005 12:10 AM

You have a mailbox you need to sort. You can't have it come back through your MTA, of course. Use this script to push it through the procmail filter of your choice:

#!/bin/sh

ORGMAIL=/var/spool/mail/$LOGNAME

if cd $HOME &&
  test -s $ORGMAIL &&
  lockfile -r0 -l3600 .newmail.lock 2>/dev/null
then
  trap "rm -f .newmail.lock" 1 2 3 15
  umask 077
  lockfile -l3600 -ml
  cat $ORGMAIL >>.newmail &&
  cat /dev/null >$ORGMAIL
  lockfile -mu
  formail -s procmail <.newmail &&
  rm -f .newmail
  rm -f .newmail.lock
fi
exit 0
commandsmailboxmtaprocmailscriptsshellsort
Useful Exim commands by http://felicity.me.uk/ on Apr 28, 2008 02:00 PM

display the route from your server to any email address:

exim -bt email@domain.com

send an email using exim:

exim -v email@domain.com

show the number of emails in the queue:

exim -bpc

display the mail queue:

exim -bp

flush queue:

exim -qff &

view a particular mail in the queue:

exim -Mvh msgid (for headers)
exim -Mvb msgid (for body)
commandseximmailmta
RSS