A PCRE internal error occured. This might be caused by a faulty plugin

====== Differences ====== This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
packages:postfix [2014/02/07 04:35]
admin [Install Postfix]
packages:postfix [2014/02/07 05:00] (current)
admin [Test Postfix]
Line 30: Line 30:
 </​code>​ </​code>​
  
-Add the domain names that your system will handle. ​+Add the domain names that your system will handle.
 <​code>​ <​code>​
 postconf -e "​relay_domains = example.com,​ example2.com,​ example3.com"​ postconf -e "​relay_domains = example.com,​ example2.com,​ example3.com"​
Line 40: Line 40:
 </​code>​ </​code>​
  
 +===== Relay Authentification =====
 +If your relay host requires authentication,​ or blocks port 25, you'll need to further configure Postfix:
 +
 +<​code>​
 +apt-get install libsasl2-modules
 +</​code>​
 +
 +<​code>​
 +postconf -e "​relayhost = [smtp.domainname.tld]:​587"​
 +postconf -e "​smtp_sasl_auth_enable = yes"
 +postconf -e "​smtp_sasl_password_maps = hash:/​etc/​postfix/​sasl_passwd"​
 +postconf -e "​smtp_sasl_security_options = noanonymous"​
 +</​code>​
 +
 +Create a file called sasl_passwd in// /​etc/​postfix/​sasl_passwd//​. Inside type in 
 +<​code>​
 +sudo nano /​etc/​postfix/​sasl_passwd
 +
 +[smtp.domainname.tld]:​587 username@domainnanme.tld:​mypassword
 +</​code>​
 +
 +Now change permissions so others can't read it: 
 +<​code>​
 +chmod 600 /​etc/​postfix/​sasl_passwd
 +</​code>​
 +
 +Now postmap it. (It creates a database-like file so postfix can read it.) 
 +<​code>​
 +postmap /​etc/​postfix/​sasl_passwd
 +</​code>​
 +
 +Restart postfix ​
 +<​code>​
 +postfix reload
 +</​code>​
 +
 +Done. You can use "​mutt"​ to send emails outside. Check /​var/​log/​mail.log to see if everything is working.
 ===== Test Postfix ===== ===== Test Postfix =====
 +You should nbow be able to send mail to the outside world using Postfix:
 +<​code>​
 +telnet localhost 25
 +</​code>​
 +
 +You should see: 
 +<​code>​
 +Trying 127.0.0.1...
 +Connected to localhost.localdomain.
 +Escape character is '​^]'​.
 +220 server1.example.com ESMTP Postfix (Debian/​GNU)
 +</​code>​
 +
 +Send an email to a test recipient:
 +<​code>​
 +mail from:<​you@youremail.com>​
 +rcpt to:<​user@example.com>​
 +data
 +To: user@example.com
 +From: you@youremail.com
 +Subject: Hey my first email
 +This is my first email on debian postfix after installing configuring it.
 +It was easy.
 +</​code>​
 +
 +To end data hit enter, type in a dot, and hit enter again: ​
 +<​code>​
 +.
 +</​code>​
 +
 +Quit the session:
 +<​code>​
 +quit
 +</​code>​