mydomain

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

mydomain

Pili Muñoz Gargallo
hi all
i am a student and i am very lost in this world. i am finishing my end of career project and i have to send mail notifications whenever a alarm is trigged. I am using nagios for doing it.
Another boy installed a CentOS server, and it has a postfix installation from rpm. I configured main.cf like i used to do,  but in maillog i send mails like [hidden email].
i have changed mydomain and everything you see in it..
I tried the system on a VMware machine, but i installed it from tar.gz. I am new to linux too, and i am afraid to make yum delete postfix and then install from tar.gz...
I don´t know what to do... or where to get more information about it..

Any suggestion would be great!

thanks in advance

Pili

main.cf (34K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: mydomain

Charles Marcus
On 6/25/2008, Pili Muñoz Gargallo ([hidden email]) wrote:
> Any suggestion would be great!

 From what little info you provded, the only suggestion I have is (from
the welcome message you got when jopining this list):

TO REPORT A PROBLEM see http://www.postfix.org/DEBUG_README.html#mail

--

Best regards,

Charles
Reply | Threaded
Open this post in threaded view
|

Re: mydomain

Pili Muñoz Gargallo
Hi all again
I try to explain myself better. I have this main.cf

myhostname = virtual.mon.embou.es
mydomain = mon.embou.es
myorigin = $mydomain
mynetworks_style = host
relay_domains = $mydestination
relayhost = smtp.embou.com
but when i try to send a mail, i get this info in maillog

maillog
Jun 25 17:24:20 monitoring sendmail[30581]: m5PFOKHK030581: from=root, size=76, class=0, nrcpts=1, msgid=<[hidden email]>, relay=root@localhost
Jun 25 17:24:20 monitoring postfix/smtpd[29655]: connect from monitoring[127.0.0.1]
Jun 25 17:24:20 monitoring postfix/smtpd[29655]: 60E051261618: client=monitoring[127.0.0.1]
Jun 25 17:24:20 monitoring postfix/cleanup[29658]: 60E051261618: message-id=<[hidden email]>
Jun 25 17:24:20 monitoring postfix/qmgr[28293]: 60E051261618: from=<[hidden email]>, size=588, nrcpt=1 (queue active)
Jun 25 17:24:20 monitoring sendmail[30581]: m5PFOKHK030581: to=[hidden email], ctladdr=root (0/0), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30076, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (Ok: queued as 60E051261618)
Jun 25 17:24:20 monitoring postfix/smtpd[29655]: disconnect from monitoring[127.0.0.1]
Jun 25 17:24:20 monitoring postfix/smtp[29659]: 60E051261618: host smtp.embou.com[87.238.88.6] said: 450 4.1.8 <[hidden email]>: Sender address rejected: Domain not found (in reply to RCPT TO command)
Jun 25 17:24:20 monitoring postfix/smtp[29659]: 60E051261618: to=<[hidden email]>, relay=smtp.embou.com[87.238.88.5]:25, delay=0.19, delays=0.07/0/0.09/0.03, dsn=4.1.8, status=deferred (host smtp.embou.com[87.238.88.5] said: 450 4.1.8 <[hidden email]>: Sender address rejected: Domain not found (in reply to RCPT TO command))


i thought i could send a mail like @mon.embou.com and i still sending like localhost.localdomain..
i have tried to create a sender_canonical file, but when i did  postalias hash:sender_canonical i got a warning
postalias: warning: sender_canonical, line 12: name must be local

that line was [hidden email] : [hidden email]  but i tried [hidden email]: [hidden email]
the configuration i have in main worked ok if i  installed from postfix-2.5.1.tar, but they installed from postfix-2.3.3-2..

I hope i have explained better my problem...
and thank you very much for the quick answer.

Pili



2008/6/25 Charles Marcus <[hidden email]>:
On 6/25/2008, Pili Muñoz Gargallo ([hidden email]) wrote:
Any suggestion would be great!

From what little info you provded, the only suggestion I have is (from the welcome message you got when jopining this list):

TO REPORT A PROBLEM see http://www.postfix.org/DEBUG_README.html#mail

--

Best regards,

Charles

Reply | Threaded
Open this post in threaded view
|

Re: mydomain

Brian Evans - Postfix List
Pili Muñoz Gargallo wrote:

> Hi all again
> I try to explain myself better. I have this *main.cf <http://main.cf>
>
> *myhostname = virtual.mon.embou.es <http://virtual.mon.embou.es>
> mydomain = mon.embou.es <http://mon.embou.es>
> myorigin = $mydomain
> mynetworks_style = host
> relay_domains = $mydestination
> relayhost = smtp.embou.com <http://smtp.embou.com>
> but when i try to send a mail, i get this info in maillog
You still haven't read http://www.postfix.org/DEBUG_README.htm#mail.
We do NOT want any part of main.cf.   We DO want 'postconf -n'.

PLEASE review in full the link above.

Brian
>
> *maillog*
> Jun 25 17:24:20 monitoring sendmail[30581]: m5PFOKHK030581: from=root,
> size=76, class=0, nrcpts=1,
> msgid=<[hidden email]>,
> relay=root@localhost
Is this is the sendmail daemon?  Uninstall it if you have sendmail
installed (postfix supplies it's own sendmail CLIENT).

> Jun 25 17:24:20 monitoring postfix/smtpd[29655]: connect from
> monitoring[127.0.0.1 <http://127.0.0.1>]
> Jun 25 17:24:20 monitoring postfix/smtpd[29655]: 60E051261618:
> client=monitoring[127.0.0.1 <http://127.0.0.1>]
> Jun 25 17:24:20 monitoring postfix/cleanup[29658]: 60E051261618:
> message-id=<[hidden email]>
> Jun 25 17:24:20 monitoring postfix/qmgr[28293]: 60E051261618:
> from=<[hidden email]>, size=588, nrcpt=1 (queue active)
> Jun 25 17:24:20 monitoring sendmail[30581]: m5PFOKHK030581:
> to=[hidden email] <mailto:[hidden email]>,
> ctladdr=root (0/0), delay=00:00:00, xdelay=00:00:00, mailer=relay,
> pri=30076, relay=[127.0.0.1 <http://127.0.0.1>] [127.0.0.1
> <http://127.0.0.1>], dsn=2.0.0, stat=Sent (Ok: queued as 60E051261618)
> Jun 25 17:24:20 monitoring postfix/smtpd[29655]: disconnect from
> monitoring[127.0.0.1 <http://127.0.0.1>]
> Jun 25 17:24:20 monitoring postfix/smtp[29659]: 60E051261618: host
> smtp.embou.com <http://smtp.embou.com>[87.238.88.6
> <http://87.238.88.6>] said: 450 4.1.8 <[hidden email]>:
> Sender address rejected: Domain not found (in reply to RCPT TO command)
> Jun 25 17:24:20 monitoring postfix/smtp[29659]: 60E051261618:
> to=<[hidden email] <mailto:[hidden email]>>,
> relay=smtp.embou.com <http://smtp.embou.com>[87.238.88.5
> <http://87.238.88.5>]:25, delay=0.19, delays=0.07/0/0.09/0.03,
> dsn=4.1.8, status=deferred (host smtp.embou.com
> <http://smtp.embou.com>[87.238.88.5 <http://87.238.88.5>] said: 450
> 4.1.8 <[hidden email]>: Sender address rejected: Domain
> not found (in reply to RCPT TO command))
>
>
> i thought i could send a mail like @mon.embou.com
> <http://mon.embou.com> and i still sending like localhost.localdomain..
> i have tried to create a sender_canonical file, but when i did  
> postalias hash:sender_canonical i got a warning
> *postalias: warning: sender_canonical, line 12: name must be local
>
> *that line was *[hidden email] : [hidden email]
> <mailto:[hidden email]>  *but i tried *[hidden email]
> <mailto:[hidden email]>: [hidden email] <mailto:[hidden email]>*
> the configuration i have in main worked ok if i  installed from
> postfix-2.5.1.tar, but they installed from postfix-2.3.3-2..
>
> I hope i have explained better my problem...
> and thank you very much for the quick answer.
>
> Pili
>
>
>
> 2008/6/25 Charles Marcus <[hidden email]
> <mailto:[hidden email]>>:
>
>     On 6/25/2008, Pili Muñoz Gargallo ([hidden email]
>     <mailto:[hidden email]>) wrote:
>
>         Any suggestion would be great!
>
>
>     From what little info you provded, the only suggestion I have is
>     (from the welcome message you got when jopining this list):
>
>     TO REPORT A PROBLEM see http://www.postfix.org/DEBUG_README.html#mail
>
>     --
>
>     Best regards,
>
>     Charles
>
>

Reply | Threaded
Open this post in threaded view
|

Re: mydomain

Jorey Bump
In reply to this post by Pili Muñoz Gargallo
Pili Muñoz Gargallo wrote, at 06/25/2008 11:04 AM:

> Jun 25 17:24:20 monitoring sendmail[30581]: m5PFOKHK030581: from=root,
> size=76, class=0, nrcpts=1,
> msgid=<[hidden email]>,
> relay=root@localhost

> Jun 25 17:24:20 monitoring postfix/smtpd[29655]: connect from
> monitoring[127.0.0.1 <http://127.0.0.1>]

You appear to have both sendmail and Postfix installed. Uninstall
sendmail and follow your distribution's instructions for setting up
Postfix as the default MTA. You may need to reinstall Postfix or modify
a few system files.


Reply | Threaded
Open this post in threaded view
|

Re: mydomain

Pili Muñoz Gargallo
my postconf -n is

alias_maps = hash:/etc/aliases
command_directory = /usr/sbin
config_directory = /etc/postfix
daemon_directory = /usr/libexec/postfix
debug_peer_level = 5
html_directory = no
mail_owner = postfix
mailq_path = /usr/bin/mailq.postfix
manpage_directory = /usr/share/man
mydomain = mon.embou.es
myhostname = virtual.mon.embou.es
mynetworks_style = host
myorigin = $mydomain
newaliases_path = /usr/bin/newaliases.postfix
queue_directory = /var/spool/postfix
readme_directory = /usr/share/doc/postfix-2.3.3/README_FILES
relay_domains = $mydestination
relayhost = smtp.embou.com
sample_directory = /usr/share/doc/postfix-2.3.3/samples
sendmail_path = /usr/sbin/sendmail.postfix
setgid_group = postdrop
unknown_local_recipient_reject_code = 550

i knew i have sendamil installed but i have stopped the service and make it wont start automatically from list
chkconfig --list | grep sendmail
sendmail        0:desactivado   1:desactivado   2:desactivado   3:desactivado  4:desactivado    5:desactivado   6:desactivado
sendmail está parado
 i am quite new to linux.. i know it is not a linux question: can i  unistall sendmail with a yum remove sendmail?
sorry for being so annoying, i feel very stupid...
thanks again




2008/6/25 Jorey Bump <[hidden email]>:
Pili Muñoz Gargallo wrote, at 06/25/2008 11:04 AM:


Jun 25 17:24:20 monitoring sendmail[30581]: m5PFOKHK030581: from=root, size=76, class=0, nrcpts=1, msgid=<[hidden email]>, relay=root@localhost

Jun 25 17:24:20 monitoring postfix/smtpd[29655]: connect from monitoring[127.0.0.1 <http://127.0.0.1>]

You appear to have both sendmail and Postfix installed. Uninstall sendmail and follow your distribution's instructions for setting up Postfix as the default MTA. You may need to reinstall Postfix or modify a few system files.



Reply | Threaded
Open this post in threaded view
|

Re: mydomain

Jorey Bump
Pili Muñoz Gargallo wrote, at 06/25/2008 11:29 AM:

> newaliases_path = /usr/bin/newaliases.postfix
> sendmail_path = /usr/sbin/sendmail.postfix

Refer to your distribution's documentation for setting the default MTA.
Typically, there are utilities that create the proper symlinks for these
binaries.

> i knew i have sendamil installed but i have stopped the service and make
> it wont start automatically from list

It doesn't matter here, since your system is using the sendmail binary
provided by the sendmail package, using sendmail's configuration.

>  i am quite new to linux.. i know it is not a linux question: can i  
> unistall sendmail with a yum remove sendmail?

Refer to your distribution's documentation. Because many applications
depend on certain binaries to be present in standard locations, it can
be challenging to have multiple MTAs installed. With minimal
distributions (like Slackware), it's usually sufficient to uninstall any
existing MTA software and install the desired MTA. Other distributions
(SUSE, Red Hat, Debian, etc.) use special structures and/or utilities to
explicitly set the default MTA, sometimes allowing different MTA
packages to remain installed. I avoid wizard-based distros, but if you
use one, you should be familiar with these utilities, otherwise you may
find your configuration completely hosed after some random event, such
as a reboot.

> sorry for being so annoying, i feel very stupid...

You are stupid. We all are. Hopefully, we'll be less stupid tomorrow.
Enjoy the ride. :)


Reply | Threaded
Open this post in threaded view
|

Re: mydomain

mouss-2
In reply to this post by Pili Muñoz Gargallo
Pili Muñoz Gargallo wrote:

> my postconf -n is
>
> alias_maps = hash:/etc/aliases
> command_directory = /usr/sbin
> config_directory = /etc/postfix
> daemon_directory = /usr/libexec/postfix
> debug_peer_level = 5
> html_directory = no
> mail_owner = postfix
> mailq_path = /usr/bin/mailq.postfix
> manpage_directory = /usr/share/man
> mydomain = mon.embou.es
> myhostname = virtual.mon.embou.es
> mynetworks_style = host
> myorigin = $mydomain
> newaliases_path = /usr/bin/newaliases.postfix
> queue_directory = /var/spool/postfix
> readme_directory = /usr/share/doc/postfix-2.3.3/README_FILES
> relay_domains = $mydestination
>  

replace this with
relay_domains =

> relayhost = smtp.embou.com
> sample_directory = /usr/share/doc/postfix-2.3.3/samples
> sendmail_path = /usr/sbin/sendmail.postfix
> setgid_group = postdrop
> unknown_local_recipient_reject_code = 550
>
> i knew i have sendamil installed but i have stopped the service and make it
> wont start automatically from list
> chkconfig --list | grep sendmail
> sendmail        0:desactivado   1:desactivado   2:desactivado
> 3:desactivado  4:desactivado    5:desactivado   6:desactivado
> sendmail está parado
>  

that stops the service, but the sendmail command still points to the
Sendmail package. so programs that call sendmail (or mail...) will use
the other MTA.
>  i am quite new to linux.. i know it is not a linux question: can i
> unistall sendmail with a yum remove sendmail?
>  

the best solution is to remove sendmail (yum remove...). but you can
force your mta without removing others with
#alternative --config mta

finally, you can also tell nagios to use whatever sender you want. find
the place where it runs the sendmail command and add a "-f $sender". I
personally think that nagios "alert" mechanism is too naive and
recommend using a (perl|python|*) script to manage that (otherwise, you
get way too many alerts or not enough. and even for alerts, managing who
should get which alert is too much work in nagios...).


> sorry for being so annoying, i feel very stupid...
>  

it would be good if you stop "top posting". The "good practice" in
public lists is "bottoms posting" (put your text below the text your
reply to). if you don't understand what I mean, google is your friend.