postmaster, abuse and :fail:

aegis

Well-Known Member
Jul 6, 2003
70
2
158
I want to use a default mail address of

*: :fail: No such address

... in a domain's valias file. Easy enough to do but I still want to let through [email protected] and [email protected] as per common practice. Some servers for instance will not allow mail through if there is no [email protected] defined for a domain, Sourceforge being an example.

What's the best way of making sure users have these two defined?

Could I set a global rule in the /etc/alias file so that they'd go to me if the user didn't have them? Do I set them in every valias file? Or is this best done in exim.conf?
 

chirpy

Well-Known Member
Verifed Vendor
Jun 15, 2002
13,437
31
473
Go on, have a guess
Actually, it's probably best done in /etc/aliases so that it is server wide (if you want to receive [email protected] on your server. Most would probably do something like this (postmaster is usually already configured):

Code:
postmaster: root
abuse: root
Edit: Just tried that and it didn't work. I'll have a play and see what best solution I can come up with.
 
Last edited:

chirpy

Well-Known Member
Verifed Vendor
Jun 15, 2002
13,437
31
473
Go on, have a guess
OK, the above doesn't work because the system aliases are checked after the virtual aliases :rolleyes:

Here's a solution:

1. Create a file called /etc/myaliases with:

Code:
postmaster: root
abuse: root
2. In the WHM > Exim Configuration Editor scroll down to the section "DIRECTORS CONFIGURATION" and in the first textbox of that section put:

Code:
mysystem_aliases:
  driver = redirect
  allow_defer
  allow_fail
  data = ${lookup{$local_part}lsearch{/etc/myaliases}}
  file_transport = address_file
  pipe_transport = address_pipe
  retry_use_local_part
You'll then have a server-wide postmaster and abuse address that won't be interefered with by users having :fail: Default Addresses.
 
  • Like
Reactions: destr0yr

sleddog

Active Member
Jun 13, 2004
44
0
156
Labrador, Canada
What happens if an account has configured postmaster & abuse virtual aliases (in addition to the system-wide ones)? A mail to postmaster (or abuse) gets delivered to two recipients?
 

chirpy

Well-Known Member
Verifed Vendor
Jun 15, 2002
13,437
31
473
Go on, have a guess
No. This catches those emails before they hit /etc/valiases/ and delivers them only to the configured addresses in /etc/myaliases.
 

nisse

Well-Known Member
Nov 11, 2003
87
0
156
I use this:

Code:
postmaster_alias:
  driver = redirect
  domains = +local_domains
  condition  = ${if eq{$local_part}{postmaster}{1}{0}}
  data = root
 
Last edited:

nisse

Well-Known Member
Nov 11, 2003
87
0
156

10101

Well-Known Member
Sep 4, 2003
151
0
166
chirpy said:
The method I posted works just fine.

I get this in dnsstuff when i try it:

ERROR: One or more of your mailservers does not accept mail to [email protected]. Mailservers are required (RFC822 6.3, RFC1123 5.2.7, and RFC2821 4.5.1) to accept mail to postmaster.
my-servername.com's postmaster response: >>> RCPT TO [email protected]> <<< 550-test.dnsstuff.com (test.DNSreport.com) [69.2.200.182] is currently not 550-permitted to relay through this server. Perhaps you have not logged into 550-the pop/imap server in the last 30 minutes or do not have SMTP 550 Authentication turned on in your email client.
 

chirpy

Well-Known Member
Verifed Vendor
Jun 15, 2002
13,437
31
473
Go on, have a guess
Well, using my method, if you have done it correctly and have roots email forwarded correctly should definitely work as I've implemented it successfully on hundreds of servers. Here's the response for our main domain in dnsreport.com:

OK: All of your mailservers accept mail to [email protected] (as required by RFC822 6.3, RFC1123 5.2.7, and RFC2821 4.5.1).

If yours isn't working, I can only guess that you've missed one of the steps somewhere. Feel free to PM me if you'd like me to take a peek for you.
 

10101

Well-Known Member
Sep 4, 2003
151
0
166
Ive followed the steps perfectly which makes it odd that isnt working. i have roots email to go to an email address in "Change System Mail Preferences", its not an email address used on that server mind.
 

nisse

Well-Known Member
Nov 11, 2003
87
0
156
That suggests that the MX record for mydomain is pointing to 127.0.0.1. Is it?