Linux, Virtualization and whatever I find interesting ...

User Tools

Site Tools

Postfix use with gmx

  • How to use postfix to send mails via a public provider.
  • Here an example with gmx using Ubuntu.


apt-get install postfix libsasl2-modules mailx 


  • When you install postfix a configuration dialog is opened.
  • internet with smarthost
  • mail relay: mail.gmx.net
  • mail name: hostname
  • You can reconfigure postfix:
    dpkg-reconfigure --priority=low postfix



  • add to main.cf of postfix


smtp_sasl_auth_enable = yes
# noplaintext # only wenn you provider doesn't support password encryption :
smtp_sasl_security_options = noanonymous
smtp_sasl_password_maps = hash:/etc/postfix/sasl_password
  • create /etc/postfix/sasl_password
sudo touch /etc/postfix/sasl_password 
  • Enter the necessary authentication informations in the following format “smtp.mailanbieter.de username:securepassword”.
  • Create db file with postmap an then delete plain text file.
sudo postmap /etc/postfix/sasl_password 
rm /etc/postfix/sasl_password
  • restart postfix
/etc/init.d/postfix restart

Correct sender address

  • Most provider check the sender address so you can't send mails under another name.
  • Therefor postfix has to replace the sender address.


sender_canonical_maps = hash:/etc/postfix/sender_canonical
  • create “/etc/postfix/sender_canonical” as shown below.
user user@gmx.net
www-data user@gmx.net
root user@gmx.net
  • create db file and restart postfix
sudo postmap /etc/postfix/sender_canonical
sudo /etc/init.d/postfix restart   


  • Now you need aliases so that postfix know where to send mails to root.


root:   user@gmx.net
  • Reload the db file
  • You don't need to restart postfix


hostname | mailx -s "root `hostname` `date`" root


Error: Call to a member function getTplFile() on null

Error: Call to a member function getTplFile() on null

An unforeseen error has occured. This is most likely a bug somewhere. It might be a problem in the blogtng plugin.

More info has been written to the DokuWiki error log.