Postfix config - cron messages for root going to root@ISP.

This is a discussion on Postfix config - cron messages for root going to root@ISP. within the Linux Networking forums, part of the Linux Forums category; I have installed Postfix on Mandrake 10.1, with the settings recommended by R.P. Goldman at http://rpgoldman.real-...


Go Back   Usenet Forums > Linux Forums > Linux Networking

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-25-2005
Doug Laidlaw
 
Posts: n/a
Default Postfix config - cron messages for root going to root@ISP.

I have installed Postfix on Mandrake 10.1, with the settings recommended by
R.P. Goldman at http://rpgoldman.real-time.com/linux/postfix-linux.html
designed specifically for Mandrake. Among his settings he recommends
setting myorigin to be isp.net, so that my emails will appear to be from
me@myisp.net and less likely to be rejected as bogus.

According to a posting on a SuSe list, the result of this is to make root's
emails go in the mail queue to root@isp.net, so the ISP gets them,
regardless of any aliases saying that root's emails should go to my user
inbox. This has happened to me twice, and I was only doing what the howto
said. Apparently myorigin should be mybox.myisp.net, but this contradicts
Goldman's reason for doing it the other way to begin with.

What is the correct setup?

Doug.
--
ICQ Number 178748389. Registered Linux User No. 277548.
There is no limit to what can be accomplished if it doesn't matter who gets
the credit.
- Emerson.

Reply With Quote
  #2 (permalink)  
Old 02-25-2005
Yamaska
 
Posts: n/a
Default Re: Postfix config - cron messages for root going to root@ISP.

Doug Laidlaw wrote:
> I have installed Postfix on Mandrake 10.1, with the settings recommended by
> R.P. Goldman at http://rpgoldman.real-time.com/linux/postfix-linux.html
> designed specifically for Mandrake. Among his settings he recommends
> setting myorigin to be isp.net, so that my emails will appear to be from
> me@myisp.net and less likely to be rejected as bogus.
>
> According to a posting on a SuSe list, the result of this is to make root's
> emails go in the mail queue to root@isp.net, so the ISP gets them,
> regardless of any aliases saying that root's emails should go to my user
> inbox. This has happened to me twice, and I was only doing what the howto
> said. Apparently myorigin should be mybox.myisp.net, but this contradicts
> Goldman's reason for doing it the other way to begin with.
>
> What is the correct setup?
>
> Doug.


If you don't plan on using postfix for your own domainname, you might as
well use the SMTP service that your ISP provides.

It's not a smart move to "fake" your ISP's domainname on your mailserver
and a good way of getting yourself blacklisted with your ISP.

So either use localhost (for local messaging) or use a domainname for
sending mail to external recipients.

If your mailserver is not secure enough and you keep using your ISP's
domainname,.. they could end up getting blacklisted of your server get's
hacked for spam/relay purposes.

Just my 2 cents

Pete
Reply With Quote
  #3 (permalink)  
Old 02-25-2005
Doug Laidlaw
 
Posts: n/a
Default Re: Postfix config - cron messages for root going to root@ISP.

Yamaska wrote:

> Doug Laidlaw wrote:
>> I have installed Postfix on Mandrake 10.1, with the settings recommended
>> by R.P. Goldman at
>> http://rpgoldman.real-time.com/linux/postfix-linux.html
>> designed specifically for Mandrake. Among his settings he recommends
>> setting myorigin to be isp.net, so that my emails will appear to be from
>> me@myisp.net and less likely to be rejected as bogus.
>>
>> According to a posting on a SuSe list, the result of this is to make
>> root's emails go in the mail queue to root@isp.net, so the ISP gets them,
>> regardless of any aliases saying that root's emails should go to my user
>> inbox. This has happened to me twice, and I was only doing what the
>> howto
>> said. Apparently myorigin should be mybox.myisp.net, but this
>> contradicts Goldman's reason for doing it the other way to begin with.
>>
>> What is the correct setup?
>>
>> Doug.

>
> If you don't plan on using postfix for your own domainname, you might as
> well use the SMTP service that your ISP provides.
>
> It's not a smart move to "fake" your ISP's domainname on your mailserver
> and a good way of getting yourself blacklisted with your ISP.
>
> So either use localhost (for local messaging) or use a domainname for
> sending mail to external recipients.
>
> If your mailserver is not secure enough and you keep using your ISP's
> domainname,.. they could end up getting blacklisted of your server get's
> hacked for spam/relay purposes.
>
> Just my 2 cents
>
> Pete

Thanks Pete.

I am using SMTP for sending emails, but am using postfix to download mail on
a regular basis. That is probably unnecessary. The problem is, that
although I am not using postfix to send external emails, it is still there,
and is sending out these Cron messages.

I don't see why Goldman needs to do it if he is using an ordinary e-mail
client. He is implying that emails created by my e-mail client (kmail)
which has a standard SMTP configuration, will somehow be altered to show my
(bogus) domain name as the origin, instead of, or in addition to the one in
kmail's setup. That would prevent them from being sent at all. It is true
that my domain name will appear in other headers. Others have suggested
that the correct setting is mybox.<ISPdomain> . That seems to have nothing
to commend it, and I have seen no reason given. I propose to follow
Postfix's setup config, which will ensure that cron messages are directed
to my local hostname and protect my account for the time being, and I am
emailing Goldman.

Doug.
--
ICQ Number 178748389. Registered Linux User No. 277548.
Anger is one letter away from danger.
- Eleanor Roosevelt.

Reply With Quote
  #4 (permalink)  
Old 02-25-2005
Bit Twister
 
Posts: n/a
Default Re: Postfix config - cron messages for root going to root@ISP.

On Fri, 25 Feb 2005 19:17:17 +1100, Doug Laidlaw wrote:
> I have installed Postfix on Mandrake 10.1, with the settings recommended by
> R.P. Goldman at http://rpgoldman.real-time.com/linux/postfix-linux.html
> designed specifically for Mandrake. Among his settings he recommends
> setting myorigin to be isp.net, so that my emails will appear to be from
> me@myisp.net and less likely to be rejected as bogus.


That is what I did to get past some postmaster rules.


> According to a posting on a SuSe list, the result of this is to make root's
> emails go in the mail queue to root@isp.net, so the ISP gets them,
> regardless of any aliases saying that root's emails should go to my user
> inbox.


Right or wrong, What works for me on a lan node,

To /etc/postifx/virtual, adding

root root@localhost
postmaster postmaster@localhost
bittwister bittwister@localhost

$ postmap virtual

$ grep root: aliases
root: bittwister

$ postalias aliases

Appended to main.cf
myorigin = wb.home.invalid
myhostname = wb.home.invalid
mydomain = home.invalid
mynetworks = 127.0.0.0/8, 192.168.2.0/24
relay_domains =
relayhost = 192.168.2.1
inet_interfaces = $myhostname, localhost
virtual_alias_maps = hash:/etc/postfix/virtual

On the firewall/WAN node, which talks to my ISP's mail server

# my appended changes to main.cf

myorigin = comcast.net
myhostname = fw.home.invalid
mydomain = home.invalid
mynetworks = 192.168.1.0/24, 127.0.0.0/8
mydestination = $myhostname localhost.$mydomain localhost
relayhost = smtp.comcast.net
relay_domains = $mydomain
inet_interfaces = $myhostname, localhost

# swap linux users into my ISP eamil users and vice versa

sender_canonical_maps = hash:/etc/postfix/canonical_sender
recipient_canonical_maps = hash:/etc/postfix/canonical_recipient

Snippet from canonical_sender
root@comcast.net my_isp_addy@comcast.net
root@fw.home.invalid my_isp_addy@comcast.net
root@wb.home.invalid my_isp_addy@comcast.net
root@home.invalid my_isp_addy@comcast.net
root my_isp_addy@comcast.net

$ postmap canonical_sender

cat virtual
root my_isp_addy@comcast.net

$ postmap virtual
Reply With Quote
  #5 (permalink)  
Old 02-27-2005
Doug Laidlaw
 
Posts: n/a
Default Re: Postfix config - cron messages for root going to root@ISP.

Bit Twister wrote:

> On Fri, 25 Feb 2005 19:17:17 +1100, Doug Laidlaw wrote:
>> I have installed Postfix on Mandrake 10.1, with the settings recommended
>> by R.P. Goldman at
>> http://rpgoldman.real-time.com/linux/postfix-linux.html
>> designed specifically for Mandrake. Among his settings he recommends
>> setting myorigin to be isp.net, so that my emails will appear to be from
>> me@myisp.net and less likely to be rejected as bogus.

>
> That is what I did to get past some postmaster rules.
>
>
>> According to a posting on a SuSe list, the result of this is to make
>> root's emails go in the mail queue to root@isp.net, so the ISP gets them,
>> regardless of any aliases saying that root's emails should go to my user
>> inbox.

>
> Right or wrong, What works for me on a lan node,
>
> To /etc/postifx/virtual, adding
>
> root root@localhost
> postmaster postmaster@localhost
> bittwister bittwister@localhost
>
> $ postmap virtual
>
> $ grep root: aliases
> root: bittwister
>
> $ postalias aliases
>
> Appended to main.cf
> myorigin = wb.home.invalid
> myhostname = wb.home.invalid
> mydomain = home.invalid
> mynetworks = 127.0.0.0/8, 192.168.2.0/24
> relay_domains =
> relayhost = 192.168.2.1
> inet_interfaces = $myhostname, localhost
> virtual_alias_maps = hash:/etc/postfix/virtual
>
> On the firewall/WAN node, which talks to my ISP's mail server
>
> # my appended changes to main.cf
>
> myorigin = comcast.net
> myhostname = fw.home.invalid
> mydomain = home.invalid
> mynetworks = 192.168.1.0/24, 127.0.0.0/8
> mydestination = $myhostname localhost.$mydomain localhost
> relayhost = smtp.comcast.net
> relay_domains = $mydomain
> inet_interfaces = $myhostname, localhost
>
> # swap linux users into my ISP eamil users and vice versa
>
> sender_canonical_maps = hash:/etc/postfix/canonical_sender
> recipient_canonical_maps = hash:/etc/postfix/canonical_recipient
>
> Snippet from canonical_sender
> root@comcast.net my_isp_addy@comcast.net
> root@fw.home.invalid my_isp_addy@comcast.net
> root@wb.home.invalid my_isp_addy@comcast.net
> root@home.invalid my_isp_addy@comcast.net
> root my_isp_addy@comcast.net
>
> $ postmap canonical_sender
>
> cat virtual
> root my_isp_addy@comcast.net
>
> $ postmap virtual


Thanks, BT. So, you have a fictitious "myorigin". You certainly don't have
your ISP's domain as your origin, as Goldman recommends. What email client
do you use? I am using Kmail, and always send outgoing mail via SMTP. If
that setup works for you, it should work for me. I wouldn't expect any
problems unless perhaps I had internal mailing within a network, as well as
an ISP for external mail - which I haven't.

Apart from this one point, I would heartily recommend Goldman's guide to
configuring Postfix for the home user.

Doug.
--
ICQ Number 178748389. Registered Linux User No. 277548.
We don't seem to be able to check crime, so why don't we legalize it and
then tax it out of business.
- Will Rogers.

Reply With Quote
  #6 (permalink)  
Old 02-27-2005
Bit Twister
 
Posts: n/a
Default Re: Postfix config - cron messages for root going to root@ISP.

On Sun, 27 Feb 2005 19:42:49 +1100, Doug Laidlaw wrote:

> Thanks, BT. So, you have a fictitious "myorigin". You certainly don't have
> your ISP's domain as your origin, as Goldman recommends.


On the LAN nodes you are correct. On the firewall node you are incorrect, the
orgin becomes my isp's domain. I gave a LAN main.cf and a WAN side main.cf.

> What email client do you use?


Depends, thunderbird has my isp's smtp for out/inbound and that kind of
setup connects directly to to the ISP's MTA, bypassing postfix.

When I use _mail_ at the command line, wb.home.invalid's postfix
connects to fw.home.invalid which connects to my ISP's MTA.

> I am using Kmail, and always send outgoing mail via SMTP.


Then postfix does not send your mail and is out of the loop.

> If that setup works for you, it should work for me. I wouldn't expect any
> problems unless perhaps I had internal mailing within a network, as well as
> an ISP for external mail - which I haven't.


I thought that was what started this thread. You were not getting
mail from cron (internal mailing).

Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 04:29 AM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0