nema5pic
vi-hell
clippie

Postfix


~~

Commands/Troubleshooting

config files in /etc/postfix
	main.cf
logs in /var/log/maillot

postfix reload		# after doing changes to config files
postfix flush 		# churn thru the mail backlog
mailq			# check the mailq


postconf -d    # show default param for postfix 
postconf -d  | grep mydomain
postconf -d  | grep myhost 

postconf -n 		# to find out what settings are overruled by your main.cf. 
postconf mail_version	# To find out what Postfix version you have, execute the command 

address rewritting bible :)

http://www.postfix.org/ADDRESS_REWRITING_README.html#masquerade

mascarade is to hide some early portion of the domain name, 
eg strip na.nova.com to nova.com


/etc/postfix/canonical			# change domain address in both sender and recipient
					# main for username to first.last, 
					# but should be able to specify domain as in eg of sender-canonical

/etc/postfix/sender-canonical		# sender only, need to enable clause in main.cf.  
					# eg content:
		@local		@na.grumpy.com
		@headnode	@na.grumpy.com
		@headnode.local	@na.grumpy.com


/etc/postfix/recipient-canonical	# eg:
		root@na.grumpy.com	root
		@mycluster.local	@na.grumpy.com


after update to the file, recreate hash (or dbm) as:
sudo postmap /etc/postfix/sender-canonical

Specify dbm instead of hash if your system uses dbm files instead of db files. To find out what lookup tables Postfix supports, use the command "postconf -m".

Execute the command "postmap /etc/postfix/relay_recipients" whenever you change the relay_recipients table.

Execute the command "postmap /etc/postfix/transport" whenever you change the transport table.


main.cf

Example for cluster head node (which act as relay host for all compute nodes):

mydestination = $mydomain, $myhostname, localhost.$mydomain
mynetworks = 10.10.8.0/24, 127.0.0.0/8, 192.168.2.0/24
inet_interfaces = all
append_dot_mydomain = no
sender_canonical_maps = hash:/etc/postfix/sender-canonical
recipient_canonical_maps = hash:/etc/postfix/recipient-canonical
##
relayhost = smtp.na.skinforum.org
mydomain = na.skinforum.org
myorigin = headnode.na.skinforum.org

Ref

interesting command and script to delete deferred mail. http://www.cyberciti.biz/tips/howto-postfix-flush-mail-queue.html









Copyright info about this work

This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike2.5 License. Pocket Sys Admin Survival Guide: for content that I wrote, (CC) some rights reserved. 2005,2012 Tin Ho [ tin6150 (at) gmail.com ]
Some contents are "cached" here for easy reference. Sources include man pages, vendor documents, online references, discussion groups, etc. Copyright of those are obviously those of the vendor and original authors. I am merely caching them here for quick reference and avoid broken URL problems.



Where is PSG hosted these days?