Questions tagged [postfix]

Free and open source mail transfer agent (MTA) that routes and delivers email. When asking about postfix problem, please include the relevant maillog lines and output of the following command: `postconf -n` (non-default content of main.cf) and `postconf -M` (content of master.cf)

22
votes
3answers
38k views

How to configure postfix to pipe all incoming email to a script?

Using postfix, I'd like all incoming mail, to any address (including those that don't map to local users) to be piped to a script. I've tried configuring mailbox_command in /etc/postfix/main.cf: ...
37
votes
8answers
30k views

Why Does hotmail still reject my emails?

I have a very strange problem with my emails being marked as spam by hotmail. I just have configured Postfix + Dovecot on my server and all works perfectly. I can Send/Receive emails. I only have ...
52
votes
6answers
361k views

How to correct Postfix' 'Relay Access Denied'?

This morning, in order to correct a problem with a name mismatch in the security certificate, I followed the recommended steps from How to fix mail server SSL?, but now, when attempting to send an ...
21
votes
4answers
43k views

How to make Postfix use another IP address?

I'm using the Postfix mail server and I have 6 IPs available. I'd like to use another IP for the Postfix mail server for sending mail than the web server uses. How can I do this? My postfix version ...
13
votes
3answers
13k views

How to enforce sender address to be “logged-in-user@example.org” in Postfix?

I have set up a Postfix server with SMTP AUTH (STARTTLS on port 587). All my users are in the domain "example.org". I want to enforce the sender address to be "logged-in-user@example.org". I learned ...
39
votes
4answers
28k views

DKIM sign outgoing mail from any domain (with Postfix and Ubuntu)

I got DKIM setup on my mail server (postfix and ubuntu) so it signs outgoing emails. I used these instructions: https://help.ubuntu.com/community/Postfix/DKIM However, I need it to sign emails from ...
25
votes
5answers
42k views

Forcing the from address when postfix relays over smtp

I'm trying to get email reports from our AWS EC2 instances. We're using Exchange Online (part of Microsoft Online Services). I've setup a user account specifically for SMTP relaying, and I've setup ...
15
votes
3answers
30k views

How to collect bounces in postfix

This is related to this question: linux - Ways to get a bounceback report for my newsletter application? - Server Fault Let's say I'm generating email addresses like this when I send out ...
22
votes
2answers
19k views

Confused about alias_maps and virtual_alias_maps

I have already re-read the docs on this as well as other posts here and this is still very unclear to me. I have been testing various things to understand the difference between alias_maps and ...
13
votes
4answers
27k views

Postfix disable local delivery

Is there any form to prevent local delivery on a postfix server? Ideally, I want to avoid local delivery to some domains, because this postfix server is a google apps backup one.
9
votes
3answers
45k views

mail loops back to myself | postfix

Hi I have an issue with bounced mail it does not happen all the time but at the same time is very frequent. Most of the time if I send an email to an address that does not exist then i get a bounce ...
9
votes
1answer
36k views

Configure Postfix to send/relay emails Gmail (smtp.gmail.com) via port 587

Using Centos 5.4, with Postfix. I can do a mail foo@gmail.com subject: blah test . Cc: and the msg gets sent to gmail, but it resides in the spam folder, which is to be expected. My goal is to ...
27
votes
6answers
47k views

postfix - how do you redirect all emails to one user, eg *@example.com → user@example.com

I'm using postfix for my email. I know I can use /etc/aliases and newaliases command to redirect certain email, eg I can redirect root@example.com to user@example.com by putting root: user in my /etc/...
25
votes
2answers
22k views

“No worthy mechs found” when trying to relay email to Gmail using Postfix

I've been trying to configure email to forward to Gmail, using Postfix to relay email to smtp.gmail.com. However, I'm failing to get it to authenticate with smtp.gmail.com, which is a rather vital ...
6
votes
1answer
16k views

postfix multiple IP SMTP banner

I've installed postfix 2.11.3 and we have multiple IP addresses on our server which we want to host two domains, isolated and running on their own IPs. domain1 unix - - n - - ...
4
votes
1answer
4k views

How can I set up Postfix so that all email sent on my dev box gets routed to the developer email group?

I have a development server, and at the moment email is disabled on it, so we can do whatever we need to with the system without worrying about accidentally emailing clients' customers. I'd like to ...
5
votes
5answers
11k views

postfix fails to send mail with “fatal: unknown service: smtp/tcp”

I have installed postfix, and when I tried to send a mail to gmail it told me that it has been sent, but when I checked my inbox in Gmail I didn't saw it. This is how the connection looked like: $ ...
5
votes
3answers
11k views

Why does Postfix deliver mails locally instead of relaying them to Google Apps?

I get the following error trying to send an email to my Google Apps Email at admin@mydomain.com from my Postfix server. to=, relay=local, delay=0.09, delays=0.07/0/0/0.02, dsn=5.1.1, status=bounced ...
4
votes
1answer
10k views

postfix header_checks using regexp proper setup

I just can't seem to figure out why header_checks are not being evaluated. I'm on Ubuntu 12.04, postfix 2.7, dovecote, spamassasin, clamav, amavis. I add following line to /etc/postfix/main.cf : ...
3
votes
2answers
3k views

Use different relay in postfix

In our application, we send different kind of mails. On a broad view we can generalize it in two category, Mails which monitor the health of the app. Mails which we send to end user. Is there any ...
2
votes
2answers
8k views

How do I remove Received-headers from emails?

I'm using Postfix 2.3.3 and mail sent from my server always add useless headers which I'd like to remove. Currently I'm only using the PHP mail() function to send mail. Return-Path: Received: from ...
1
vote
1answer
1k views

Postfix forwards to Gmail being rate limited even with unmodified headers

I've installed Postfix on Ubuntu 14.04 with the defaults. I then configured some virtual aliases to forward email from a few addresses to various personal (mostly Gmail) accounts. This is just to make ...
5
votes
2answers
1k views

How do I get Postfix to deliver ALL mail to a custom script?

I am trying to configure postfix so that ALL mail that arrives (to any domain) is piped into a shell script that I have. I have tried several things, including setting mailbox_command = ...
2
votes
2answers
363 views

postfix relay based on origin

I have 4 servers. prod1.example.com, prod2.example.com, dev1.example.com, and dev2.example.com. They all send their mails to smtp.example.com. This server does the relay. Now I want that dev1 and dev2 ...
1
vote
1answer
302 views

How can I prevent Postfix from accepting mail from domains it owns, that it didn’t send?

I have Postfix configured with a few domains, delivering to Dovecot locally. I’ve noticed some interesting spam that comes in, purporting to be from an address at one of those domains, but that ...
58
votes
3answers
82k views

Is Postfix the same thing as Sendmail?

I have Postfix setup on my server so that I can send outgoing mail using the command-line: mail -s "Subject" address@example.com Is this using Sendmail or Postfix ? Is "Sendmail" just a software ...
13
votes
3answers
17k views

How to redirect all outgoing email from postfix to a single address for testing

I am setting up a testing server for a web based application that sends some email notifications. Sometimes testing is performed with real customer data, and for that reason I need to guarantee that ...
12
votes
4answers
37k views

How to build a high availability Postfix system?

I'm needing to set up a remote mirror for a postfix server (where the content of both mail servers should be the same at any time). The idea is that if the main server comes down at some point the ...
17
votes
1answer
19k views

How can I configure Postfix to retain copies of all email sent through it?

My company currently uses Google Apps for email. I can configure Google Apps to forward all outgoing email through a relay server. I can also point my MX records at this server and have it forward ...
11
votes
2answers
11k views

How to redirect all mail from one domain to another in Postfix?

I have two forms of the same domain name, one being a common misspelling of the other, let's say tedswidgets.com and tedswigets.com. I'd like to redirect all mail for <someone>@tedswigets.com to ...
8
votes
4answers
13k views

Postfix: how to use simple file for SASL authentication?

I'd like to run Postfix on a Debian VPS to send e-mails from my application. The application (running on other VPSes) would connect to Postfix via SMTP. Postfix does not have to handle incoming email; ...
10
votes
5answers
14k views

Outgoing only SMTP server

I want to setup an outgoing only SMTP server on Debian, so my Web-applications will be able to send e-mails via it. I don't want to use another hosts because of security and customizability of my own ...
10
votes
3answers
21k views

Postfix check outgoing mail for spam

How can I force postfix to check (and log/flag/etc) all outgoing mail for spam? Just want to make sure I'm doing my part on my servers. EDIT: Postfix config, as requested. main.cf # See /usr/share/...
5
votes
3answers
7k views

How to catchall email to a single user mailbox in postfix

I am new to postfix, i need to configure it so that any incoming email to my server will be delivered to a local user account(/etc/passwd). My server will not have any virtual domains($mydestination) ...
5
votes
4answers
18k views

Block outgoing mail to specific address using Postfix

How could I block outgoing mail to a specific address using Postfix? I've partially managed to block outgoing e-mail using header_checks. However, header_checks doesn’t cover BCC. I also tested ...
11
votes
4answers
23k views

Dovecot user lookup fails when using username@domain format

I have Dovecot v2.0.11 installed on a FreeBSD server and the user lookups for incoming email addresses are failing, but lookups for system users is successful. Dovecot is setup to use system users, ...
5
votes
3answers
13k views

Add email account to postfix

I have add a user in linux called "mailer". I'm only using this user to send outgoing mail, not receive. What do I need to do in order use the following SMTP information to send outgoing mail? $...
5
votes
5answers
4k views

How do I spamtrap with Postfix?

How do I setup spamtraps with Postfix so clients that send to trapped addresses are prevented from sending me more spam?
3
votes
2answers
625 views

Change reception in postfix queue

After running postqueue -p i sometimes finds misspelled email-adresses, is there a way to change the reception adress (envelop to adress) of the messages, so it can be delivered. exemple: postqueue -...
3
votes
2answers
6k views

Configure Postfix to use external MX servers for delivery of local mail if user is unknown

I have a following setup: linux box with postfix configured to be responsible for example.com domain domain's MX servers are configured so that mail sent to example.com is sent to google mail servers ...
7
votes
7answers
18k views

Why am I getting “write queue file: No space left on device” from postfix when there's 5GB of free space on disk?

It started happening today... all of a sudden, no apparent reason! Here's the output from df: assp:~# df -k Filesystem 1K-blocks Used Available Use% Mounted on /dev/simfs ...
5
votes
2answers
8k views

Postfix REJECT (not BOUNCE) unknown virtual aliases

We run a small postfix (and dovecot) mail server for a number of hosted domains, using virtual alias maps and with spamassassin configured. Recently it's become apparent that we're generating some ...
3
votes
1answer
5k views

Route mail in postfix to different relays based on subject

I am looking to configure postfix to route messages to different relays based on the contents of a subject line. The desired result would be if a user sent an outbound e-mail with a specific tag say "...
1
vote
1answer
709 views

Relase outgoing mails to internet if local delivery failes

How can I release outgoing mail to the internet if local delivery fails in postfix? My server has virtual domains configured with mydomain.tld. When I send an email to somename@mydomain.tld it try to ...
1
vote
1answer
3k views

Postfix configuration: different outgoing hosts based on sender

I've seen a few answers to this on the web, but nothing definitive nor any good examples. I relay all my mail out through Postfix, currently everything sent to my ISP's mail server. However, there ...
3
votes
1answer
6k views

Postfix/Dovecot - Multiple Domains and Multiple Linux Accounts

I have been trying to setup a new mail server to migrate from my VPS, as my host has decided to close its doors. The old server was running Exim/Courier (nearly a decade old at this point,) and I'm ...
-2
votes
2answers
6k views

Postfix - How to prevent external clients from using my server as a relay? [closed]

I have a postfix server installed on Ubuntu 14.04. A PHP script running on the machine uses it to send outgoing email. Additionally, I use postfix to receive mail sent to a local account, which is ...
79
votes
1answer
126k views

What ports to open for mail server?

I have just finished setting up a Postfix mail server on a linux (ubuntu) platform. I have it sending and receiving email and it is not an open relay. It also supports secure smtp and imap. Now this ...
20
votes
2answers
17k views

Virtual Domains with Postfix and SSL

I've got a Postfix mail server setup for hosting multiple virtual domains (say xxx.com and yyy.com). Users configure their outgoing mail server as mail.xxx.com and mail.yyy.com. All mail servers ...
20
votes
5answers
1k views

Is it good practice or too draconian to reject mails from mailservers with no RDNS

I've recently dropped SpamAssassin and am now basing spam rejection on DNSRBL's, grey-listing and other basic tests and I'm wondering whether I should also block hosts that don't have a valid RDNS ...