Tag Info

Hot answers tagged

29

openDKIM and Postfix on Ubuntu Server 12.04LTS I'll try to come back and format this better. But since there was a request to post my answer, I wanted to post it now rather than wait until I had time to format it properly. Due to lack of time, I wrapped my entire answer in a blockquote. I hope this solution is helpful. These are my references: man ...


15

It would appear that you have configured smtp.gmail.com as your smarthost for the mail server. You need to remove the smarthost configuration or edit it so that your server is at all capable of sending mail to the outside world. The configuration you have now for the mail forward appears to be working, but is failing because smtp.gmail.com is rejecting the ...


9

Read Local Email With Thunderbird Watch Vido Step no 1. sudo apt-get install postfix -y If installed sudo dpkg-reconfigure postfix configure it for local email, Choose the default settings & use localhost as hostname Step no 2. sudo nano /etc/aliases And replace root with your user name, My user ...


8

"Bounce" emails are sometimes part of a spam attack, though I doubt this is the case in your instance. 550-XX.XX.XX.XX blocked by ldap:ou=rblmx,dc=att,dc=net 550 Error - Blocked for abuse. This leads me to believe that your server IP has made a blacklist - particularly one with att.net. I would check your domain on mxtoolbox.com and check that you're not ...


8

They should be in /var/log/mail.log. However, it appears that your syslog facility configuration was changed by you (or your provider). Using the plain syslogd instead of rsyslogd is very much possible, but then you can expect things to work different to your expectation. As already mentioned in the comments, by installing rsyslog, the files reappeared.


8

In your php.ini, this: sendmail_path = /etc/postfix Should be the path to the sendmail (or compatible) binary. You've set it to the configuration directory of postfix which isn't right. For historical reasons, usually /usr/bin/sendmail is maintained as a compatibility link. sendmail was around first (I guess) and pretty much everything just assumes it is ...


8

You can handle this with a transport map. First tell postfix to use a map, with the following in main.cf: transport_maps = hash:/etc/postfix/transport Then in /etc/postfix/transport add the custom route: example.net smtp:example.net:26 Then build the map database: sudo postmap /etc/postfix/transport


7

The standard solution is to use the header_checks option. This will work, however, if we filter received lines on all mail both incoming and outgoing (as this will do), we could potentially lose Received headers on mail sent to us, which can be important for troubleshooting. To get around this problem, we will apply the header_checks only to the mail that ...


7

There are a lot of guides online regarding the config and steps for 'hardening' postfix. This one courtesy of http://security-24-7.com/hardening-guide-for-postfix-2-x/ Hardening guide for Postfix 2.x Make sure the Postfix is running with non-root account: ps aux | grep postfix | grep -v '^root' Change permissions and ownership on the destinations ...


7

Postfix is a drop-in sendmail replacement that includes its own sendmail binary (see the foot of this post). I'm honestly surprised apt let you do this, I thought they were package conflicted. Anyway, to fix: sudo apt-get purge sendmail sudo apt-get install --reinstall postfix sudo /etc/init.d/postfix restart Proof that sendmail on my system is ...


7

Postfix is started in init.d, so you can use update-rc.d to disable it on startup: sudo update-rc.d postfix disable When you want to enable it again: sudo update-rc.d postfix enable Even if it's disabled you can still start it manually with sudo service postfix start. If update-rc.d is not in your system, you'll have to install the package ...


7

Logging is enabled by default See /var/log/mail.log: Jan 20 06:47:57 zarafa postfix/qmgr[1021]: A1749428: from=<root@thuis.mydomain.net>, size=2110, nrcpt=1 (queue active) Jan 20 06:47:57 zarafa postfix/smtpd[21751]: disconnect from mail.thuis.mydomain.net[192.168.25.17] Jan 20 06:47:58 zarafa postfix/lmtp[21756]: A1749428: ...


6

No. As default postfix is not configure as an open relay, it will only accept local mail. And you don't want to configure it as an Open Relay. In a couple of days some spammer is going to find it and start using it. As a result: Your computer is going to be bogged down sending thousands of emails. Your server is going to be blocked by most other mail ...


5

You can send an email with one command like this: mail -s 'Subject' you@example.com < log.txt mail expects a stream of input, if there is none, it gets standard input (i.e. it let's you type something). The < operator (unix file-stream) tells mail to read the contents of the file, rather than /dev/stdin (which is just a file as well). Adding an ...


5

It seems very stupid but I have solved the problem. I hadn't noticed that a system administrator somehow blocked 3306 port for all hosts at the firewall, and therefore I couldn't connect to mysql. After removing that restriction I was able to connect to mysql without any problems. Thanks for your suggestions and help.


5

I had the same issue and when I issued "postconf |grep smtp|grep CA" all the variables were empty: smtp_tls_CAfile = smtp_tls_CApath = smtpd_tls_CAfile = smtpd_tls_CApath = Here's how I fixed it; I assume your Ubuntu install created the CA path that contains all known CAs on the internet: /etc/ssl/certs, and Equifax is there. All you're missing in ...


5

You need to enable TLS in Postfix's SMTP client, since Google requires it. This is indicated by them in the message "Must issue a STARTTLS command". In /etc/postfix/main.cf, you want something like this: smtp_tls_policy_maps = hash:/etc/postfix/tls_policy and then in /etc/postfix/tls_policy: [smtp.gmail.com]:587 encrypt The left hand side in ...


5

For me the solituion was a variant of Oli answer in an Ubuntu13: Error: fatal: bind 0.0.0.0 port 25: Address already in use Sendmail purge didn't work: Package 'sendmail' is not installed, so not removed So I tried: service sendmail stop sudo apt-get install --reinstall postfix and worked!


4

You need to quote the arguments to test to stop them 'breaking' on whitespace, i.e. if $ var1="sudo apt-get install postfix" then $ if test $var1 = sudo apt-get install postfix; then echo "Match"; fi bash: test: too many arguments but $ if test "$var1" = "sudo apt-get install postfix"; then echo "Match"; fi Match The same applies if you use the [ ...


4

mail points to one of the alternatives. ls -l /usr/bin/mail lrwxrwxrwx 1 root root 22 Jan 5 2011 /usr/bin/mail -> /etc/alternatives/mail ls -l /etc/alternatives/mail lrwxrwxrwx 1 root root 18 Jan 5 2011 /etc/alternatives/mail -> /usr/bin/bsd-mailx You were probably using another mail program in the past. Try to figure out which it was. After ...


4

From [1] pg 832 Another parameter we should set is mydestination, which specifies the mail domains that are local. The changes which are relevant to my question: Change the mydestination setting in /etc/postfix/main.cf to be blank. mydestination = run sudo postfix reload [1] Unix and Linux system administration handbook, 4ed, ...


4

Beware of putting /var/spool/ on tmpfs! User CRON JOBS are stored under /var/spool/ on Ubuntu! If you put /var/spool/ on tmpfs you will not be able to have any user cron jobs because they will be erased on every shutdown. The system crontab however is located in /etc/crontab and is edited directly NOT with the crontab -e command. found this out the hard ...


4

I guess you could use a virtual. If example.com is your domain on postfix on /etc/postfix/main.cf virtual_alias_maps = hash:/etc/postfix/virtual on /etc/postfix/virtual root@example.com dave after edit postmap hash:/etc/postfix/virtual Should be working. If i understood right your question, know mails to root@example.com wil go to local ...


4

Nuke it in orbit! Your server was compromised, I wouldn't try to "repair it" but plainly starting from 0 and then prevent it gets compromised again. You can check our network paranoids security experts counsels at Information Security. Related: How do you know your server has been compromised? Prevent from happening again: Determining the point of ...


4

You are right on both. They are standard spam attempts, and postfix is denying relaying to them. If these are your full logs, then you are lucky if you are only seeing that few attempts per day. You can still harden it quite a lot, using SSL for example, but it didn't look like you need it. You can change this to main.cf to force all the clients that want ...


4

As a temporary measure you can try to redirect all traffic going out of your computer from port 25 to port 26 with iptables just for testing: sudo iptables -t nat -I OUTPUT --src 0/0 -p tcp --dport 25 -j REDIRECT --to-ports 26


4

You can change it in postfix configuration file /etc/postfix/main.cf. The helo line is controlled by the smtpd_banner parameter. It probably references the myhostname option. Put your server name there instead of localhost: myhostname = server.example.com smtpd_banner = myhostname and restart postfix with sudo postfix reload.


4

To answer my own question, using postfix this is possible. You have to do two things: Add the configuration options discussed in SMTP server to deliver ALL mail to user@localhost, add the following to your /etc/postfix/main.cf file: luser_relay = MYLOCALUSER@localhost local_recipient_maps = Using the following answer on serverfault ( ...


3

Postfix is actually a bit of both; it's a mail transfer agent, or MTA. However, note that if you only wish to fetch mail, you may find it easier to install and configure the aptly named fetchmail program to accomplish this task.



Only top voted, non community-wiki answers of a minimum length are eligible