Jump to content

Sendmail (now postfix)


Gowator
 Share

Recommended Posts

Can anyone tell me why this is being delivered?

Its a simple CLI mail from root to postmaster where postmaster is aliased to root... to test the mail..

Note the domain name TWICE

GRR

Date: Today 11:13:30 pm

From: root <root@linuxmigrations.hd.free.fr>

To: postmaster@linuxmigrations.hd.free.fr.hd.free.fr

 

GRR

I had this all working nicely and then played about...

I literally wanted a specific mail user to receive mail that a php function picks up and posts for me... andit was all working but I used an existing user for the mail... then i though I needed a special user... made one and messed about (not sure what)... and now I have no delivery to any users from external and this internal one which worked had the domain part twice!

Edited by Gowator
Link to comment
Share on other sites

I don't use sendmail, but postfix, but seems you've edited a config somewhere and it's appending the domain name to one you've edited and supplied manually.

 

I'd check the sendmail config first, maybe it's here.

Link to comment
Share on other sites

[OK, I give up on sendmail... I figure postfix should work anyway (it extrernally looks like sendmail)

So I tried that.... and Im still stuck!!!

 

Please post the contents of /etc/resolv.conf and /etc/aliases for me...

/etc/aliases

postmaster: root

 

daemon: root

bin: root

sys: root

sync: root

games: root

man: root

lp: root

mail: root

news: root

uucp: root

proxy: root

majordom: root

postgres: root

www-data: root

backup: root

msql: root

operator: root

list: root

irc: root

gnats: root

 

mailer-daemon: postmaster

clamav: root

resolv.conf is pretty simple

 

nameserver 212.27.54.252

nameserver 212.27.53.252

Link to comment
Share on other sites

Can you post the relevant /etc/postfix/main.cf as well as your /etc/hosts, and perhaps output from hostname and hostname -f.

uggh I'm an idiot...

I just looked again and I posted the /etc/aliases from this machine not the server! The server has no /etc/aliases ! (resolv.conf is the same though)

 

 

/etc/hosts

127.0.0.1 localhost.localdomain localhost

192.168.1.2 linuxmigrations.hd.free.fr linuxmigrations

 

 

Meanwhile I'm getting reports back from my ISP for the account ( tried sending these from)

 

Undelivered Mail Returned to Sender

Date: Today 02:23:21 am

From: Mail Delivery System <MAILER-DAEMON@free.fr>

To: xxxx@free.fr

 

This is the Postfix program at host postfix1-g20.free.fr.

 

I'm sorry to have to inform you that your message could not

be delivered to one or more recipients. It's attached below.

 

For further assistance, please send mail to <postmaster>

 

If you do so, please include this problem report. You can

delete your own text from the attached returned message.

 

The Postfix program

 

<party-bar@linuxmigrations.hd.free.fr>: Host or domain name not found. Name

service error for name=linuxmigrations.hd.free.fr type=MX: Host not found,

try again

 

This is the part always gets me...I think Im developing a mental block on mail servers!

Link to comment
Share on other sites

The main.cf should have all the hostname stuff in, and should accept the message, providing your isp can send it to your domain name, and the mx records are configured correctly.

 

Your error above was hinting at an mx record problem either the record not existing, or pointing to an ip that no longer exists or unreachable to the server if the IP is natted.

 

What's important in main.cf is the myhostname and mydomain entries, these are what I was attempting to ascertain if they are correct as it should accept the mail for this domain if this part is configured correctly along with the other usual config options.

Link to comment
Share on other sites

main.cf

smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)

biff = no

 

# appending .domain is the MUA's job.

append_dot_mydomain = no

 

# Uncomment the next line to generate "delayed mail" warnings

#delay_warning_time = 4h

 

alias_maps = hash:/etc/aliases

alias_database = hash:/etc/aliases

myorigin = /etc/mailname

mydestination = linuxmigrations.hd.free.fr, localhost.hd.free.fr, localhost

mynetworks = 127.0.0.0/8

mailbox_command = procmail -a $EXTENSION

mailbox_size_limit = 0

recipient_delimiter = +

luser_relay = nobody

 

linuxmigrations:/etc/postfix# hostname -f

linuxmigrations.hd.free.fr

linuxmigrations:/etc/postfix# hostname

linuxmigrations.hd.free.fr

 

Your error above was hinting at an mx record problem either the record not existing, or pointing to an ip that no longer exists or unreachable to the server if the IP is natted.

Thanks.... YEP I bet its the NAT... :D

However, Im still baffled...

I have 25 open but not 110

but I can send mail but not receive it?

Shouldn't it be the other way around?

Link to comment
Share on other sites

Hmmm, I don't see the myhostname or mydomain in your main.cf, mine normally has:

 

myhostname = mail2.linuxsolutions.org
mydomain = linuxsolutions.org

 

you're also using myorigin, with a strange pointer, not sure on this setup, never used myorigin before, and what you're looking at here in /etc/mailname.

Link to comment
Share on other sites

OK now looks like

_________________

smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)

biff = no

 

# appending .domain is the MUA's job.

append_dot_mydomain = no

 

# Uncomment the next line to generate "delayed mail" warnings

#delay_warning_time = 4h

 

alias_maps = hash:/etc/aliases

myorigin = linuxmigrations.hd.free.fr

mydestination = linuxmigrations.hd.free.fr, localhost.hd.free.fr, localhost

myhostname = linuxmigrations.hd.free.fr

mydomain = linuxmigrations.hd.free.fr

mynetworks = 127.0.0.0/8

mailbox_command = procmail -a $EXTENSION

mailbox_size_limit = 0

recipient_delimiter = +

luser_relay = nobody

 

_____________-

Have a /etc/aliases

and the /etc/mailname contained

 

 

linuxmigrations:/etc/postfix# more /etc/mailname

linuxmigrations.hd.free.fr

Link to comment
Share on other sites

You shouldn't need myorigin, you can get rid of this altogether, I don't use it in my postfix setup. I'll have to ssh the box later, and get you the config.

 

The rest looks OK though, but I'll post mine later, so you can see what I got.

Link to comment
Share on other sites

Thanks man ....

Your welcome to log in and poke about...

I can pm you a password etc. :D

I don't know what it is with mail servers, I just get a mental block ...?? I still haven't sucessfully got one working (well I did and broke it)... but I think it goes back to trying with qmail from source and basically getting lost.. now I just mental block!

Link to comment
Share on other sites

OK, if you like me to take a look, send me a pm, I can ssh in from home later (wife permitting :P ).

 

I'll also get the config off my mail server too from what I've got so far, so you can take a look.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...