Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > macOS > Use postfix or revert to sendmail (10.3)?

Use postfix or revert to sendmail (10.3)?
Thread Tools
Zim
Senior User
Join Date: Apr 2001
Location: Cary, NC
Status: Offline
Reply With Quote
Oct 26, 2003, 12:06 PM
 
For the religious zealots on this holy war, please, I beg you to do your best not to just preach :-)

I had made 2 adjustments to sendmail (pre 10.3)

a) change my outgoing FROM domain to always be my ISP domain, not my hostname that I use from a dynamic DNS provider
EDIT: this is done my setting the myorigin variable in /etc/postfix/main.cf

b) use my ISP as an outgoing relay (I believe that is the correct term).. not for SPAM.. but b/c AOL (for one) started blocking all incoming mail from dynamic addr ranges... so where I would send direct out before, now I had to use my ISP
EDIT: This would appear to be setting the relayhost variable in main.cf (ref: http://www.gungeralv.org/notes/archives/000449.php)


Are these easy to do with Postfix?
EDIT: Yep.

Since I do a fair amt of web testing on my machine, I'm thinking that it might be best for me to use sendmail instead, to most closely mimic the environments (on other hosts) that I develop for...sendmail is in /usr/sbin, how do I make it the default? (ie. /var/logs/mail/log shows that my outgoing mail is using postfix now, vs sendmail... where is that determined?)

EDIT: Do I just replace the Postfix startup item in /System/Library/StartupItems with the Sendmail one in my archived 10.2 system folder?

Thanks,
Mike
( Last edited by Zim; Oct 26, 2003 at 03:03 PM. )
     
Rainy Day
Grizzled Veteran
Join Date: Nov 2001
Location: Oregon
Status: Offline
Reply With Quote
Nov 1, 2003, 02:55 PM
 
Since I do a fair amt of web testing on my machine, I'm thinking that it might be best for me to use sendmail instead, to most closely mimic the environments (on other hosts) that I develop for...sendmail is in /usr/sbin, how do I make it the default? (ie. /var/logs/mail/log shows that my outgoing mail is using postfix now, vs sendmail... where is that determined?)

EDIT: Do I just replace the Postfix startup item in /System/Library/StartupItems with the Sendmail one in my archived 10.2 system folder?
I think all you have to do is change a UNIX link to the real sendmail binary. You should be able to find the answer somewhere on the Postfix documentation pages.
     
pahroza
Dedicated MacNNer
Join Date: Feb 2001
Location: Atlanta, GA
Status: Offline
Reply With Quote
Nov 6, 2003, 02:37 PM
 
For part two.

Easy easy, su to root and do the following

1) edit /etc/postfix/main.cf and look for the section titled "TRANSPORT MAP"

2) add this line below that:
transport_maps = hash:/etc/postfix/transport

3) edit /etc/postfix/transport

4) add a line like this:
aol.com smtp:smtp.comcast.net

(I use comcast, so use whatever your provider's smtp server is)

5) run the following:
postmap /etc/postfix/transport

6) then run:
tail -f /var/log/mail.log

7) send a test e-mail to someone you know at aol, and you should see a line in the mail log that looks likes this:

Nov 6 13:36:09 elfstone postfix/smtp[29973]: 98D6E1EA5E4: to=<[email protected]>, relay=smtp.comcast.net[216.148.227.125], delay=1, status=sent (250 ok ; id=2003110615320901301rwp1mr)

**EDIT**
erm..... ok, nevermind the above, all your edits which i glossed over show you already know how to do that. I wouldn't use sendmail when it's so easy to use postfix, but that's your call. I heart postfix.
     
kidtexas
Grizzled Veteran
Join Date: Jan 2001
Location: usa
Status: Offline
Reply With Quote
Nov 8, 2003, 02:16 AM
 
When I try to do what you are posting, I get the following errors:

Nov 8 01:15:54 tgray postfix/trivial-rewrite[2832]: fatal: open database /etc/postfix/transport.db: Inappropriate file type or format
Nov 8 01:15:55 tgray postfix/master[2727]: warning: process /usr/libexec/postfix/trivial-rewrite pid 2832 exit status 1
Nov 8 01:15:55 tgray postfix/master[2727]: warning: /usr/libexec/postfix/trivial-rewrite: bad command startup -- throttling

Do you know what the deal is? I would really like to do exactly what you are saying.
     
Zim  (op)
Senior User
Join Date: Apr 2001
Location: Cary, NC
Status: Offline
Reply With Quote
Nov 8, 2003, 10:57 AM
 
Originally posted by pahroza:
**EDIT**
erm..... ok, nevermind the above, all your edits which i glossed over show you already know how to do that.
Actually all I did was re-direct ALL outgoing mail thru my ISP smtp host... your solution looks to SELECTIVELY do this, which is *better* (IMO), but of course, a bit more involved

I'll wait til my ISP smtp host goes down then come back and try to figure it out

Cheers,
Mike
     
pahroza
Dedicated MacNNer
Join Date: Feb 2001
Location: Atlanta, GA
Status: Offline
Reply With Quote
Nov 8, 2003, 12:43 PM
 
Originally posted by kidtexas:
When I try to do what you are posting, I get the following errors:

Nov 8 01:15:54 tgray postfix/trivial-rewrite[2832]: fatal: open database /etc/postfix/transport.db: Inappropriate file type or format
Nov 8 01:15:55 tgray postfix/master[2727]: warning: process /usr/libexec/postfix/trivial-rewrite pid 2832 exit status 1
Nov 8 01:15:55 tgray postfix/master[2727]: warning: /usr/libexec/postfix/trivial-rewrite: bad command startup -- throttling

Do you know what the deal is? I would really like to do exactly what you are saying.
I'll see if I can try to help you further, a few questions though.

Did you already have postfix running before ?

Are you on 10.3, or 10.2.x ?

What other modifications, if any, have you made to postfix ?

In your /etc/hostconfig, is MAILSERVER set to -YES- ?
     
pahroza
Dedicated MacNNer
Join Date: Feb 2001
Location: Atlanta, GA
Status: Offline
Reply With Quote
Nov 8, 2003, 12:45 PM
 
Originally posted by Zim:
Actually all I did was re-direct ALL outgoing mail thru my ISP smtp host... your solution looks to SELECTIVELY do this, which is *better* (IMO), but of course, a bit more involved

I'll wait til my ISP smtp host goes down then come back and try to figure it out

Cheers,
Mike
It's not that much more involved, really just a few lines. If you already have it working as you want it to though, it'd be pointless to change it and possibly mess something up

-Andreas
     
kidtexas
Grizzled Veteran
Join Date: Jan 2001
Location: usa
Status: Offline
Reply With Quote
Nov 8, 2003, 12:47 PM
 
Originally posted by pahroza:
I'll see if I can try to help you further, a few questions though.

Did you already have postfix running before ?

Are you on 10.3, or 10.2.x ?

What other modifications, if any, have you made to postfix ?

In your /etc/hostconfig, is MAILSERVER set to -YES- ?
I did under 10.2, but 10.3 is a clean install and I haven't messed with the config of postfix at all. i think /etc/hostconfig is set to automatic - Postfix definitely does stuff, because I can send mail with Pine which delivers mail to the local SMTP service.
     
pahroza
Dedicated MacNNer
Join Date: Feb 2001
Location: Atlanta, GA
Status: Offline
Reply With Quote
Nov 8, 2003, 12:54 PM
 
Originally posted by kidtexas:
I did under 10.2, but 10.3 is a clean install and I haven't messed with the config of postfix at all. i think /etc/hostconfig is set to automatic - Postfix definitely does stuff, because I can send mail with Pine which delivers mail to the local SMTP service.
I was having problems with incoming mail in postfix in 10.3 using the automatic setting. Eventually postfix-watch would kick in, and qmgr and postfix's master app would no longer be running. I changed the setting to yes, made the changes to the config to match my domains, then did what I mentioned above.

If you comment out the line in main.cf that i used above, and su or sudo postfix reload, do you get any error messages in /var/log/mail.log ?

I should note that everything I did above was in 10.3, although the modifications should be identical in 10.2.
     
kidtexas
Grizzled Veteran
Join Date: Jan 2001
Location: usa
Status: Offline
Reply With Quote
Nov 8, 2003, 12:58 PM
 
Originally posted by pahroza:
I was having problems with incoming mail in postfix in 10.3 using the automatic setting. Eventually postfix-watch would kick in, and qmgr and postfix's master app would no longer be running. I changed the setting to yes, made the changes to the config to match my domains, then did what I mentioned above.

If you comment out the line in main.cf that i used above, and su or sudo postfix reload, do you get any error messages in /var/log/mail.log ?

I should note that everything I did above was in 10.3, although the modifications should be identical in 10.2.
I will try to set it to YES. but to answer your question, when I comment out the transport_map bit in main.cf, everything seems to work.
     
kidtexas
Grizzled Veteran
Join Date: Jan 2001
Location: usa
Status: Offline
Reply With Quote
Nov 8, 2003, 01:05 PM
 
Originally posted by kidtexas:
I will try to set it to YES. but to answer your question, when I comment out the transport_map bit in main.cf, everything seems to work.
Hmmm... odd. that didn't work either. same error. I guess from reading the first error I get that something is wrong with format of my transport map.
Here is that sucker:
school.edu smtp:mail.mailserver.com

the two items are separated by a tab
to generate the db, i was running
postmap /etc/postfix/transport

and lastly, I called this map in main.cf with:
transport_maps=hash:/etc/postfix/transport

Is there anything wrong in all of this? it seems so simple - in the past postfix has always been straight forward for me...
     
   
Thread Tools
 
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Top
Privacy Policy
All times are GMT -4. The time now is 03:50 AM.
All contents of these forums © 1995-2017 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.8 © 2000-2017, Jelsoft Enterprises Ltd.,