Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Avoid postfix mail delivery issues on a roving Mac UNIX
I use my PowerBook both at work and at home, and switching SMTP servers twice a day just to send email was a huge pain. Luckily, I found this hint to enable postfix to deliver my mail directly, and I have been using it for a couple weeks.

However, I noticed that any mail added to the queue while I was at home seemed to have major delivery delays. Eventually I found that email wasn't being delivered at all while I was connected to the internet from home, but would be sent very soon after returning to work. I traced the problem to the fact that my home router receives a hostname from my DSL provider, but my PowerBook within the LAN just had an internal IP and not a valid hostname.

The fix to re-enable mail delivery while my PowerBook had no hostname was to add set of fallback SMTP servers to /etc/postfix/ to pick up the slack when my local smtpd fails to deliver messages. The code to add to looks like this:
fallback_relay =,
[robg adds: I haven't tested this one.]
  • Currently 1.67 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (3 votes cast)

Avoid postfix mail delivery issues on a roving Mac | 3 comments | Create New Account
Click here to return to the 'Avoid postfix mail delivery issues on a roving Mac' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Avoid postfix mail delivery issues on a roving Mac
Authored by: name99 on Jun 16, '05 11:59:42AM

The issue is probably not what you think. It is probably that the mail server you are sending the mail through (either your company's mail server or your company's ISP's mail server) does not accept mail originating from outside its network. This is a pretty standard tactic for dealing with spam.

Two solutions present themselves. One is does the relevant mail server provide authenticated SMTP? If so, it should accept SMTP from outside the network. Earthlink, for example, is like this. You can only use SMTP if you are directly connected, but if you use authenticated SMTP you can connect from anywhere.
Alternatively, do you have access to a work machine that is on 24hrs a day? If so you can use ssh tunnels to handle this for you. This is a subject discussed at length in macosxhints so I'll just give the highlights:
(1) In your /etc/xinetd.d directory create a file called smtp_via_ssh and populate it with the following text
service smtp
disable = no
only_from = localhost
socket_type = stream
wait = no
user = usernameOnThePortable
server = /usr/bin/ssh
server_args = -c blowfish -q nc localhost 25
groups = yes

(2) in Apple mail, set all mail to be delivered using localhost port 25.

(3) switch off postfix

(4) reboot

[ Reply to This | # ]
Avoid postfix mail delivery issues on a roving Mac
Authored by: lee1 on Jun 16, '05 12:00:07PM

One problem with direct delivery from your DSL-connected laptop is that some hosts will simply reject your mail. They recognize the IP as a DSL or cable (non-permanent) IP and reject the mail in a weak attempt to block possible spam. AOL does this, for example. But maybe your fallback strategy takes care of this.

[ Reply to This | # ]
Avoid postfix mail delivery issues on a roving Mac
Authored by: stefanr on Jun 17, '05 08:19:26AM

I noticed another type of problem using the PostFix method. This problem occured to me when I was sending a lot of consecutive e-mail responses and that I did not notice that I had lost my internet connection.

If I am not connected to any network, (no internet connection) Mail sends my mail anyways without prompting me that a connection was not done. In the logs (viewed in Console) this message appears:
(Host or domain name not found. Name service error for type=MX: Host not found, try again)

But in Mail, the message was sent successfully...

Does anyone know a way to make Mail notice that Postfix was not able to send?

I am on a LAN with my Powerbook and I can reproduce this everytime I unplug the Ethernet cable.

Does anyone know a fix for this?

[ Reply to This | # ]