Gingercat1.png Welcome to...
GingerCat Software
We make software for the Web the Macintosh and linux
(among other things!) We hope you enjoy our site

Blog | New Site
Some weird postfix stuff

I had some weird postfix stuff going on today and so I have written up the following notes. I hope they may be of some use to someone if not just me!

Befor you do anything back up a copy of your main.cf file


cd /etc/postfix/
cp main.cf main.cf_bk_jun4_clean

you can now relax and if need be start from scratch with

cp main.cf_bk_jun4_clean main.cf

- so we are now safe to test modify and work with the
main.cf file (this is the config file for postfix)


Run

sudo postfix check

This should check the various config files for postfix

If it can not find the comand double check by using

which postfix

/usr/sbin/postfix

add this to your .bash_profile mine (well part of it ) looks a bit like this

PATH=$PATH:$HOME/bin:/usr/sbin

log out then log back in (there is a command to automate this but it only takes a few seconds if you use your histroy command)

you should now be able to access and or issue the following postfix related commands / tools.

postalias
postcat
postconf
postdrop
postfix
postkick
postlock
postlog
postmap
postqueue
postsuper



To debug stuff open a about 3 terminals to your machine


Use one to start check stop and reload postfix using histroy again is a good idea

use one to watch your mail log and whats going on

tail -f /var/log/maillog

or

tail -f /var/log/maillog | grep postfix

On another you may want to be running

postqueue -p
Mail queue is empty


And if you need to delete stuff from the mail queue

postsuper -d [ queue number ]


postcat -q [ queue number ] to view the contents of a message


Good luck and happy postfixing !



*
You will need sudo or root access to issues some of these commands









© 2006 Steve Abrahall