Re: Strange sendmail behaviour

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 29/12/15 00:50, Franta Hanzlík wrote:
On Mon, 28 Dec 2015 10:45:55 +1030
Stephen Davies <sdavies@xxxxxxxxxx> wrote:

On 27/12/15 22:32, Franta Hanzlík wrote:
On Tue, 24 Nov 2015 14:38:43 +1030
Stephen Davies <sdavies@xxxxxxxxxx> wrote:

I am trying to change my sendmail configuration to deliver all "user unknown"
emails to a specific account (baduser).
I added the DL definition to sendmail.mc and generated test.cf.
Then I tested this new config using:

echo who | sendmail -v -Ctest.cf noone

and the email was correctly delivered to the defined account.

I then renamed test.cf to sendmail.cf (in /etc/mail) and retested with:

echo what | sendmail -Csendmail.cf noone

and again the email was delivered to the baduser account.

Happy with this, I then restarted sendmail (via systemctl) and sent yet
another email to an invalid account.

Instead of the email being delivered to baduser, I received a 550 5.1.1 user
unknown reject email.

What have I missed here.

(Fedora 22 & sendmail 8.14.7/8.13.3)

What You mean by "DL definition"?
IMO what You want is configured by defining macro "LUSER_RELAY", as:
define(`LUSER_RELAY', `local:baduser')

And, it seems as You are using old sendmail versions with F22:
v8.14.7 was semewhere in F18/F19, and sendmail v8.13.3 in Fedora 4 (ten
years ago!). It has any reason?

That is how I set the DL definition.

I have tried this experiment on two different servers and managed to give the
wrong combination of versions.

What I actually have is one box with Fedora 22 and sendmail 8.15.1/8.14.4 and
the other with Centos 7.2.1511 and sendmail 8.14.7/8.13.3.

The results are the same on both boxes.

Further experiments show that running sendmail from the command line (eg
sendmail -bv noone@xxxxxxxxxxxxxxx) gives the correct result (delivery to
baduser) but when running as a normal daemon I get the reject (again on both
boxes).

Any ideas?

This directive should be sufficient. Not sure how about its order in
'sendmail.mc', usually I give it somewhere towards the end of the file.
Local user ('baduser' here) must, of course, exist - but it may be
an alias to real name.

It is not possible, that your /etc/mail/{mailertable,virtusertable}
values cause this mail rejecting?
You test it from commandline as root or as ordinary user?
What about selinux?
What You have in your /var/log/maillog and /var/log/messages (or in
journald log, when you are using this bullshit advancement)?

I'm pretty confident that the sendmail.cf generated is correct - at least in this area.
The relevant lines are:
# place to which unknown users should be forwarded
Kuser user -m -a<>
DLlocal:baduser

baduser exists as a user and the test command must be run as root. Ordinary users are not allowed to run sendmail -bv.
selinux is disabled.
Wouldn't entries in mailertable/virtusertable affect the command line also??

The maillog (on the F22 box) says:

Dec 29 10:36:02 mustang sendmail[8371]: tBT062b7008371: <garbage@xxxxxxxxxx>... User unknown
and the sender gets a bounce response.

The Centos box does the same.
--
=============================================================================
Stephen Davies Consulting P/L                             Phone: 08-8177 1595
Adelaide, South Australia.                                Mobile:040 304 0583
--
users mailing list
users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
Have a question? Ask away: http://ask.fedoraproject.org



[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [EPEL Devel]     [Fedora Magazine]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Desktop]     [Fedora Fonts]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Fedora Sparc]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux