mail relay issue, bad recipient address syntax

Hey smarties!

I have Freebsd 7.2 and am using postfix with mailman to manage a mailing list.

My mailman interface runs perfectly. I can subscribe, remove, etc all from either the command line or the web interface...
the problem, is I have no way of reaching mailman via e-mail.

I reply to the addresses that should work, and they get sent back with an error saying.
Code:
testlist@deds1124.i2bnetworks.com
Technical details of permanent failure: 
Google tried to deliver your message, but it was rejected by the recipient domain. We recommend contacting the other email provider for 
further information about the cause of this error. The error that the other server returned was: 501 501 5.1.3 Bad recipient address syntax 
(state 14).

If I try switching the domain and host, e.g.
testlist@66.181.24.10 just for giggles...
I get:
Code:
Technical details of permanent failure: 
DNS Error: Domain name not found

anyways, I know that's useless info.

So... I'm enclosing some relevent files, as well as my postconf -n output in hopes that someone might see something that is obvious and jumps out at them.

Aragon, if you read this, don't laugh too hard at me.
lol-I'm honestly running out of ideas.

Thanks guys!!

postconf -n
Code:
alias_maps = hash:/etc/postfix/aliases,            hash:/usr/local/mailman/data/aliases
command_directory = /usr/local/sbin
config_directory = /usr/local/etc/postfix
daemon_directory = /usr/local/libexec/postfix
data_directory = /var/db/postfix
debug_peer_level = 2
html_directory = no
inet_interfaces = all
mail_owner = postfix
mailq_path = /usr/local/bin/mailq
manpage_directory = /usr/local/man
mydestination = $myhostname, localhost.$mydomain, localhost
mydomain = local.domain
myhostname = host.local.domain
mynetworks_style = host
myorigin = $myhostname
newaliases_path = /usr/local/bin/newaliases
owner_request_special = no
queue_directory = /var/spool/postfix
readme_directory = no
recipient_delimiter = +
relay_domains = $mydestination
relay_recipient_maps = hash:/usr/local/etc/postfix/relay_recipients
sample_directory = /usr/local/etc/postfix
sendmail_path = /usr/local/sbin/sendmail
setgid_group = maildrop
transport_maps = hash:/usr/local/etc/postfix/transport
unknown_local_recipient_reject_code = 550
 

Attachments

  • maillog.txt
    1.2 KB · Views: 453
  • master.cf.txt
    5.1 KB · Views: 414
  • main.cf.txt
    19.4 KB · Views: 407
  • Defaultspy.txt
    3.3 KB · Views: 390
  • mm_cfg.py.txt
    1.8 KB · Views: 410
my own mail log

Code:
Dec 13 07:22:14 deds1124 postfix/qmgr[22967]: 3886539F16: from=<plenty-bounces@deds1124.i2bnetworks.com>, size=2035, nrcpt=1 (queue active)
Dec 13 07:22:15 deds1124 postfix/smtp[23005]: 3886539F16: to=<tygrrrnelson@gmail.com>, relay=gmail-smtp-in.l.google.com[209.85.216.49]:25, 
delay=0.83, delays=0/0/0.54/0.28, dsn=2.0.0, status=sent (250 2.0.0 OK 1260659765 10si4125153pxi.7)
Dec 13 07:22:15 deds1124 postfix/qmgr[22967]: 3886539F16: removed
Dec 13 07:37:27 deds1124 postfix/qmgr[22967]: 7679639E70: from=<root@host.local.domain>, size=336, nrcpt=1 (queue active)
Dec 13 07:37:27 deds1124 postfix/qmgr[22967]: 38FAC39EA9: from=<root@host.local.domain>, size=478, nrcpt=1 (queue active)
Dec 13 07:37:29 deds1124 postfix/smtp[23064]: 38FAC39EA9: host mx00.1and1.com[74.208.5.3] said: 421 invalid sender domain 'host.local.domain' 
(misconfigured dns?) (in reply to RCPT TO command)
Dec 13 07:37:29 deds1124 postfix/smtp[23063]: 7679639E70: host mx01.1and1.com[74.208.5.4] said: 421 invalid sender domain 'host.local.domain' 
(misconfigured dns?) (in reply to RCPT TO command)
 
Then why do you have this in your Postfix config?

Code:
mydomain = local.domain
myhostname = host.local.domain
 
Postfix automatically detects mydomain, myhostname, and myorigin. Comment them out and do # postfix reload.

If it still doesn't work, try specifying them by hand. This is what I have:
Code:
myhostname = mail.hs.ntnu.edu.tw
mydomain = hs.ntnu.edu.tw
myorigin = $mydomain
 
Thanks guys

Here is my postconf - n out put

Code:
alias_maps = hash:/etc/postfix/aliases,            hash:/usr/local/mailman/data/aliases
command_directory = /usr/local/sbin
config_directory = /usr/local/etc/postfix
daemon_directory = /usr/local/libexec/postfix
data_directory = /var/db/postfix
debug_peer_level = 2
html_directory = no
inet_interfaces = all
mail_owner = postfix
mailq_path = /usr/local/bin/mailq
manpage_directory = /usr/local/man
mydestination = $myhostname, localhost.$mydomain, localhost
mynetworks_style = host
newaliases_path = /usr/local/bin/newaliases
owner_request_special = no
queue_directory = /var/spool/postfix
readme_directory = no
recipient_delimiter = +
relay_domains = $mydestination
relay_recipient_maps = hash:/usr/local/etc/postfix/relay_recipients
sample_directory = /usr/local/etc/postfix
sendmail_path = /usr/local/sbin/sendmail
setgid_group = maildrop
transport_maps = hash:/usr/local/etc/postfix/transport
unknown_local_recipient_reject_code = 550


I tried setting it to what Dutch said and that didn't work.

I commented out the myhostname mydomain and my origin, as reflected in the output... I'm not sure what is going on here :(

I don't know if its any significane...but when I mail to testlist@deds1124.i2bnetworks.com it gives me a DNS error..
Code:
Technical details of permanent failure:
DNS Error: Domain name not found

but when I mail to testlist@66.181.24.10 it gives me a rejection error
Code:
Technical details of permanent failure:
Google tried to deliver your message, but it was rejected by the recipient domain. We recommend contacting the other email provider for 
further information about the cause of this error. The error that the other server returned was: 501 501 5.1.3 Bad recipient address syntax 
(state 14).


This leads me to believe that it should really never mail to @deds1124.i2bnetworks.com and the problem is that it is not setup right to receive the @66.181.24.10

Does that make sense?

I can't believe this is being so difficult-I followed all the installation pre-and post that came with these programs..

*pulling hair out*
b ut i truly do thank you guys for taking the time to look at these.. honestly.

Thank you!

What should I try next?
 
First thing a mailserver will do is the check whether there is an MX record
Code:
$ dig -t mx deds1124.i2bnetworks.com.

; <<>> DiG 9.3.4 <<>> -t mx deds1124.i2bnetworks.com.
;; global options:  printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 46432
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;deds1124.i2bnetworks.com.      IN      MX

;; Query time: 1 msec
;; SERVER: 192.168.222.10#53(192.168.222.10)
;; WHEN: Sun Dec 13 22:36:54 2009
;; MSG SIZE  rcvd: 42
In this case there isn't one. So it has to fall back on the A record (IP address) of eds1124.i2bnetworks.com.
Code:
dig deds1124.i2bnetworks.com

; <<>> DiG 9.3.4 <<>> deds1124.i2bnetworks.com
;; global options:  printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 24296
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;deds1124.i2bnetworks.com.      IN      A

;; Query time: 206 msec
;; SERVER: 192.168.222.10#53(192.168.222.10)
;; WHEN: Sun Dec 13 22:24:48 2009
;; MSG SIZE  rcvd: 42
Sadly this also fails.Requirement for working mail: working DNS ;)
 
From my side, sending a mail with echo test | mail -s 'test' testlist@[66.181.24.10] also fails.
Code:
From MAILER-DAEMON Sun Dec 13 23:09:18 2009
Received: from localhost (localhost)
        by hercules.utp.xnet (8.14.1/8.14.1) id nBDM9IRM024436;
        Sun, 13 Dec 2009 23:09:18 +0100 (CET)
Date: Sun, 13 Dec 2009 23:09:18 +0100 (CET)
From: Mail Delivery Subsystem <MAILER-DAEMON>
Message-Id: <200912132209.nBDM9IRM024436@hercules.utp.xnet>
To: <j65nko@hercules.utp.xnet>
MIME-Version: 1.0
Content-Type: multipart/report; report-type=delivery-status;
        boundary="nBDM9IRM024436.1260742158/hercules.utp.xnet"
Subject: Returned mail: see transcript for details
Auto-Submitted: auto-generated (failure)

This is a MIME-encapsulated message

--nBDM9IRM024436.1260742158/hercules.utp.xnet

The original message was received at Sun, 13 Dec 2009 23:09:16 +0100 (CET)
from localhost.utp.xnet [127.0.0.1]

   ----- The following addresses had permanent fatal errors -----
[color=blue]<testlist@[66.181.24.10]>
    (reason: 550 5.1.1 <testlist@[66.181.24.10]>: Recipient address rejected: User unknown in local recipient table)

   ----- Transcript of session follows -----
... while talking to [66.181.24.10]:
>>> DATA
<<< 550 5.1.1 <testlist@[66.181.24.10]>: Recipient address rejected: User unknown in local recipient table
550 5.1.1 <testlist@[66.181.24.10]>... User unknown
<<< 554 5.5.1 Error: no valid recipients[/color]

--nBDM9IRM024436.1260742158/hercules.utp.xnet
Content-Type: message/delivery-status

Reporting-MTA: dns; hercules.utp.xnet
Received-From-MTA: DNS; localhost.utp.xnet
Arrival-Date: Sun, 13 Dec 2009 23:09:16 +0100 (CET)

Final-Recipient: RFC822; testlist@[66.181.24.10]
Action: failed
Status: 5.1.1
Remote-MTA: DNS; [66.181.24.10]
Diagnostic-Code: SMTP; 550 5.1.1 <testlist@[66.181.24.10]>: Recipient address rejected: User unknown in local recipient table
Last-Attempt-Date: Sun, 13 Dec 2009 23:09:18 +0100 (CET)

--nBDM9IRM024436.1260742158/hercules.utp.xnet
Content-Type: message/rfc822

Return-Path: <j65nko@hercules.utp.xnet>
Received: from hercules.utp.xnet (localhost.utp.xnet [127.0.0.1])
        by hercules.utp.xnet (8.14.1/8.14.1) with ESMTP id nBDM9GRM021556
        for <testlist@[66.181.24.10]>; Sun, 13 Dec 2009 23:09:16 +0100 (CET)
Received: (from j65nko@localhost)
        by hercules.utp.xnet (8.14.1/8.14.1/Submit) id nBDM9GCO026097
        for testlist@[66.181.24.10]; Sun, 13 Dec 2009 23:09:16 +0100 (CET)
Date: Sun, 13 Dec 2009 23:09:16 +0100 (CET)
From: j65nko@hercules.utp.xnet
Message-Id: <200912132209.nBDM9GCO026097@hercules.utp.xnet>
To: testlist@[66.181.24.10]
Subject: test

test

--nBDM9IRM024436.1260742158/hercules.utp.xnet--
So there is no user or virtual user 'testlist' on 66.181.24.10.
 
Thanks J65!

That's the problem!

I'm running Apache 22 on FreeBSD...
how should I go about fixing this? I just want to ask first before I find documentation and try and do it myself-I have a tendency to screw things up. :/
 
As far as I remember, Mailman will print a very helpful message when creating a new list from the console, telling you exactly what to add to /etc/mail/aliases (which is where all Mailman list 'accounts' live).

It usually looks like this:

Code:
testlist:              "|/usr/local/mailman/mail/mailman post testlist"
testlist-admin:        "|/usr/local/mailman/mail/mailman admin testlist"
testlist-bounces:      "|/usr/local/mailman/mail/mailman bounces testlist"
testlist-confirm:      "|/usr/local/mailman/mail/mailman confirm testlist"
testlist-join:         "|/usr/local/mailman/mail/mailman join testlist"
testlist-leave:        "|/usr/local/mailman/mail/mailman leave testlist"
testlist-owner:        "|/usr/local/mailman/mail/mailman owner testlist"
testlist-request:      "|/usr/local/mailman/mail/mailman request testlist"
testlist-subscribe:    "|/usr/local/mailman/mail/mailman subscribe testlist"
testlist-unsubscribe:  "|/usr/local/mailman/mail/mailman unsubscribe testlist"
 
crap

I just can't figure this out...

I think I might just deinstall mailman, postfix,apache22 and start over and hope this time nothing it configured wrong...

GRRRRRR...

I'm so thankful for all the time and responses guys-I wish I could just pay someone to do this.
lol.
I know it would only take a couple hours for a whiz.
 
If postfix receives a mail for the 'testlist', it needs to deliver this mail. It only can deliver if it can find something called 'testlist' to deliver to. This could be:
  • A user 'testlist' with or without a '/home/testlist' directory but with a "/var/mail/testlist" mailbox.
  • A redirection or forwarding address
  • A program which accepts the mail on standard input for further processing.

If postfix receives an email, it has to decide to either accept or reject.
After the sender tells postfix who the recipient, the "TO:", is, postfix follows a certain procedure to find out if it knows the recipient.

Most mailers follow something like this:
Scan "/etc/passwd" file, if user is there, accept. If not scan "/etc/mail/aliases" and if recipient is listed there, accept the mail, else reject.​

From the aliases man page:
Code:
DESCRIPTION
       This file describes user ID aliases used by sendmail.  The file resides
       in /etc/mail and is formatted as a series of lines of the form

	      name: addr_1, addr_2, addr_3, . . .

       The name is the name to alias, and the addr_n are the aliases for  that
       name.  addr_n can be another alias, a local username, a local filename,
       a command, an include file, or an external address.

       Local Username
	      username

	      The username must be available via getpwnam(3).

       Local Filename
	      /path/name

	      Messages are appended to the file specified by the full pathname
	      (starting with a slash (/))

       Command
	      |command

	      A  command  starts  with a pipe symbol (|), it receives messages
	      via standard input.
So if your testlist is not listed here, the only thing postfix can do is to reject the mail.

The items posted by DutchDaemon like
Code:
testlist:              "|/usr/local/mailman/mail/mailman post testlist"
are using this "|command" format I quoted from the "aliases" man page.

Don't give up, you are nearly there, you only need to add some stuff to this /etc/mail/aliases file. Don't forget to run newaliases after editing this file:
From the same man page:
Code:
       This  is  only  the  raw  data file; the actual aliasing information is
       placed into a binary format in the file [file]/etc/mail/aliases.db[/file] using  the
       program	[file]newaliases(1)[/file].	 A  [file]newaliases[/file] command should be executed each
       time the aliases file is changed for the change to take effect.
 
thanks a bunch!

My aliases all reflect the information that it should.. Funny how there's a bunch of different alias files. I'm wondering if it's mapped right though. Also, the "mydomain" part of thie postconf -d output just says i2bnetworks.com...
which is definitely not right. I'm sure that is one of the problems. So, these are the defaults settings..and editing main.cf doesn't change it. Any suggestions?


And, again thanks for your help...I don't want to give up on this! :)
 
tynelson said:
Also, the "mydomain" part of the postconf -d output just says i2bnetworks.com...
which is definitely not right. I'm sure that is one of the problems.
I just did a echo test | mail -s 'test' testlist@[66.181.24.10] and that fails with the same recipient unknown error. Another attempt echo test from j65nko | mail -s 'help' testlist@deds1124.i2bnetworks.com. fails because deds1124.i2bnetworks.com fails to resolve in DNS. A simple test from the command line confirms this:
Code:
$ host deds1124.i2bnetworks.com
Host deds1124.i2bnetworks.com not found: 3(NXDOMAIN)

So you first have to decide which on which box you want to host your mailing list: 66.181.24.10 or deds1124.i2bnetworks.com.

If you decide on "deds1124.i2bnetworks.com", you have to make sure that external hosts can find out the IP address of "deds1124"

A mailer only can send your list a mail message unless it can find out through DNS query which IP address matches "deds1124.i2bnetworks.com". Up to now that those attempts have been impossible.
I never will be able to call my uncle to wish him happy birthday, if I cannot find his phone number ;)
 
*grin*
J65nko,
I've read hundreds of these posts overtime-and I think your quote makes the top of the list.

Did you come up with that yourself? Love it!

p.s. is it simple to tell me or can you point me in the direction on how to make sure external hosts can find out the ip address of deds1124?
 
You have to tell the DNS administrator to add an entry for 'deds1124' in the zone file of the nameserver for the i2bnetworks.com. This is the simplest way.

A more complicated way would be to leave out the 'deds1124' and configure your list as [email='Sometime-request@i2bnetworks.com]'Sometime-request@i2bnetworks.com[/email]'. The mailserver receiving mail for your domain, then forwards the mail for the "Sometime" list to the 'deds1124" host.
 
Try Sometime-request@ip-66-181-24-10.cust.i2bnetworks.com. At least that is an existing name.
 
Hey Dutch

Since that is an actual e-mail address...I'm assuming it was created by mailman successfully, but-my next question:

How should I go about getting that address to relay correctly back to mailman when sent from it?
�e
 
Well, Mailman had not much to do with Sometime-request@ip-66-181-24-10.cust.i2bnetworks.com.

The first part may have been created by Mailman (I'm assuming 'Sometime' is the listname, and '-request' the Mailman 'role'), the second part is simply the name your ISP has given to your IP address: it's its reverse DNS record. As such, mail to this address should actually make it to your server.

Your server needs to know it needs to accept email sent to @ip-66-181-24-10.cust.i2bnetworks.com, or it will refuse that mail, probably with a 'relaying denied' error.

The listname itself is, as shown in an earlier post, handled by putting the proper aliases, handed out by Mailman when the list was created, in /etc/mail/aliases.

The second part is telling Postfix it needs to accept email sent to ip-66-181-24-10.cust.i2bnetworks.com at all. You'll have to figure that one out, because I don't use Postfix myself.

Getting a proper domain name in place is something you'll have to figure out later. First try to get this part working.
 
Back
Top