postfix outbound mail formatted incorrectly: to=<a1.co.za@a1.co.za>

Say, the TO address is coming out wromh:

to=<a1.co.za@a1.co.za>

How can I solve this?
CentOS5.4
Direct mail delivery is being used.

Mar 23 14:44:27 localhost postfix/master[4915]: daemon started -- version 2.3.3, configuration /etc/postfix
asdasdasdasdasdasd
Mar 23 14:45:24 localhost sendmail[4979]: o2NCj8te004979: from=root@localhost, size=626, class=0, nrcpts=1, msgid=<kzqjf8.60963h@localhost>, relay=uucp@local$
Mar 23 14:45:24 localhost sendmail[4978]: o2NCj8HW004978: from=root@localhost, size=626, class=0, nrcpts=1, msgid=<kzqjf8.2m9bbk@localhost>, relay=uucp@local$
Mar 23 14:45:24 localhost sendmail[4976]: o2NCj8aW004976: from=root@localhost, size=626, class=0, nrcpts=1, msgid=<kzqjf8.p31rq6@localhost>, relay=uucp@local$
Mar 23 14:45:24 localhost postfix/smtpd[4982]: connect from localhost[127.0.0.1]
Mar 23 14:45:24 localhost postfix/smtpd[4982]: 5B83E2A205CF: client=localhost[127.0.0.1]
Mar 23 14:45:24 localhost postfix/smtpd[4986]: connect from localhost[127.0.0.1]
Mar 23 14:45:24 localhost postfix/smtpd[4987]: connect from localhost[127.0.0.1]
Mar 23 14:45:24 localhost postfix/smtpd[4986]: 6226C2A205D0: client=localhost[127.0.0.1]
Mar 23 14:45:24 localhost postfix/smtpd[4987]: 640F32A205D5: client=localhost[127.0.0.1]
Mar 23 14:45:24 localhost postfix/cleanup[4985]: 5B83E2A205CF: message-id=<kzqjf8.60963h@localhost>
Mar 23 14:45:24 localhost postfix/cleanup[4988]: 6226C2A205D0: message-id=<kzqjf8.p31rq6@localhost>
Mar 23 14:45:24 localhost postfix/cleanup[4989]: 640F32A205D5: message-id=<kzqjf8.2m9bbk@localhost>
Mar 23 14:45:24 localhost postfix/qmgr[4917]: 5B83E2A205CF: from=<root@localhost.a1.co.za>, size=1057, nrcpt=1 (queue active)
Mar 23 14:45:24 localhost sendmail[4979]: o2NCj8te004979: to=iscafax@a1.co.za, ctladdr=root@localhost (0/0), delay=00:00:16, xdelay=00:00:00, mailer=$
Mar 23 14:45:24 localhost postfix/qmgr[4917]: 6226C2A205D0: from=<root@localhost.a1.co.za>, size=1057, nrcpt=1 (queue active)
Mar 23 14:45:24 localhost postfix/qmgr[4917]: 640F32A205D5: from=<root@localhost.a1.co.za>, size=1057, nrcpt=1 (queue active)
Mar 23 14:45:24 localhost sendmail[4976]: o2NCj8aW004976: to=iscafax@a1.co.za, ctladdr=root@localhost (0/0), delay=00:00:16, xdelay=00:00:00, mailer=$
Mar 23 14:45:24 localhost sendmail[4978]: o2NCj8HW004978: to=iscafax@a1.co.za, ctladdr=root@localhost (0/0), delay=00:00:16, xdelay=00:00:00, mailer=$
Mar 23 14:45:24 localhost lmtpunix[4819]: accepted connection
Mar 23 14:45:24 localhost lmtpunix[4819]: lmtp connection preauth'd as postman
Mar 23 14:45:24 localhost master[4995]: about to exec /usr/lib/cyrus-imapd/lmtpd
Mar 23 14:45:24 localhost lmtpunix[4995]: executed
Mar 23 14:45:24 localhost lmtpunix[4995]: accepted connection
Mar 23 14:45:24 localhost lmtpunix[4995]: lmtp connection preauth'd as postman
Mar 23 14:45:24 localhost master[4997]: about to exec /usr/lib/cyrus-imapd/lmtpd
Mar 23 14:45:24 localhost lmtpunix[4997]: executed
Mar 23 14:45:24 localhost lmtpunix[4995]: IOERROR: fstating sieve script /var/lib/imap/sieve/a/a1^co^za/defaultbc: No such file or directory
Mar 23 14:45:24 localhost lmtpunix[4819]: IOERROR: fstating sieve script /var/lib/imap/sieve/a/a1^co^za/defaultbc: No such file or directory
Mar 23 14:45:24 localhost lmtpunix[4995]: duplicate_check: <kzqjf8.p31rq6@localhost>                user.a1^co^za 0
Mar 23 14:45:24 localhost lmtpunix[4819]: duplicate_check: <kzqjf8.60963h@localhost>                user.a1^co^za 0
Mar 23 14:45:24 localhost lmtpunix[4819]: duplicate_check: <kzqjf8.60963h@localhost>                user.a1^co^za 0
Mar 23 14:45:24 localhost lmtpunix[4819]: mystore: starting txn 2147483707
Mar 23 14:45:24 localhost lmtpunix[4819]: mystore: committing txn 2147483707
Mar 23 14:45:24 localhost lmtpunix[4819]: duplicate_mark: <kzqjf8.60963h@localhost>                user.a1^co^za 1269348324 3219421028
Mar 23 14:45:24 localhost lmtpunix[4819]: Delivered: <kzqjf8.60963h@localhost> to mailbox: user.a1^co^za
Mar 23 14:45:24 localhost postfix/pipe[4992]: 5B83E2A205CF: to=<a1.co.za@a1.co.za>, orig_to=<iscafax@a1.co.za>, relay=cyrus, delay=0.$
Mar 23 14:45:24 localhost postfix/qmgr[4917]: 5B83E2A205CF: removed
Mar 23 14:45:24 localhost lmtpunix[4997]: accepted connection
Mar 23 14:45:24 localhost lmtpunix[4997]: lmtp connection preauth'd as postman
Mar 23 14:45:24 localhost lmtpunix[4997]: IOERROR: fstating sieve script /var/lib/imap/sieve/a/a1^co^za/defaultbc: No such file or directory
Mar 23 14:45:24 localhost lmtpunix[4997]: duplicate_check: <kzqjf8.2m9bbk@localhost>                user.a1^co^za 0
Mar 23 14:45:24 localhost postfix/smtpd[4986]: disconnect from localhost[127.0.0.1]
Mar 23 14:45:24 localhost postfix/smtpd[4982]: disconnect from localhost[127.0.0.1]
Mar 23 14:45:24 localhost lmtpunix[4995]: duplicate_check: <kzqjf8.p31rq6@localhost>                user.a1^co^za 0
Mar 23 14:45:24 localhost lmtpunix[4995]: mystore: starting txn 2147483708
Mar 23 14:45:24 localhost lmtpunix[4995]: mystore: committing txn 2147483708
Mar 23 14:45:24 localhost lmtpunix[4995]: duplicate_mark: <kzqjf8.p31rq6@localhost>                user.a1^co^za 1269348324 3212882580
Mar 23 14:45:24 localhost postfix/smtpd[4987]: disconnect from localhost[127.0.0.1]
Mar 23 14:45:25 localhost lmtpunix[4995]: Delivered: <kzqjf8.p31rq6@localhost> to mailbox: user.a1^co^za
Mar 23 14:45:25 localhost postfix/pipe[4994]: 6226C2A205D0: to=<a1.co.za@a1.co.za>, orig_to=<iscafax@a1.co.za>, relay=cyrus, delay=0.$
Mar 23 14:45:25 localhost postfix/qmgr[4917]: 6226C2A205D0: removed
Mar 23 14:45:25 localhost lmtpunix[4997]: duplicate_check: <kzqjf8.2m9bbk@localhost>                user.a1^co^za 0
Mar 23 14:45:25 localhost lmtpunix[4997]: mystore: starting txn 2147483709
Mar 23 14:45:25 localhost lmtpunix[4997]: mystore: committing txn 2147483709
Mar 23 14:50:52 localhost postfix/cleanup[5163]: 6775A2A205E3: message-id=<kzqjoc.ob0i86@localhost>
Mar 23 14:50:52 localhost postfix/cleanup[5164]: 6915D2A205E7: message-id=<kzqjoc.4qvfxh@localhost>
Mar 23 14:50:52 localhost sendmail[5148]: o2NCoag1005148: to=iscafax@a1.co.za, ctladdr=root@localhost (0/0), delay=00:00:16, xdelay=00:00:00, mailer=$
Mar 23 14:50:52 localhost postfix/qmgr[4917]: 6775A2A205E3: from=<root@localhost.a1.co.za>, size=1057, nrcpt=1 (queue active)
Mar 23 14:50:52 localhost sendmail[5150]: o2NCoaLI005150: to=iscafax@a1.co.za, ctladdr=root@localhost (0/0), delay=00:00:16, xdelay=00:00:00, mailer=$
Mar 23 14:50:52 localhost postfix/qmgr[4917]: 60EA22A205DE: from=<root@localhost.a1.co.za>, size=1057, nrcpt=1 (queue active)
Mar 23 14:50:52 localhost postfix/qmgr[4917]: 6915D2A205E7: from=<root@localhost.a1.co.za>, size=1115, nrcpt=1 (queue active)
Mar 23 14:50:52 localhost sendmail[5149]: o2NCoa8l005149: to=iscafax@a1.co.za, ctladdr=root@localhost (0/0), delay=00:00:16, xdelay=00:00:00, mailer=$
Mar 23 14:50:52 localhost lmtpunix[5054]: accepted connection
Mar 23 14:50:52 localhost lmtpunix[5054]: lmtp connection preauth'd as postman
Mar 23 14:50:52 localhost master[5170]: about to exec /usr/lib/cyrus-imapd/lmtpd
Mar 23 14:50:52 localhost lmtpunix[5054]: IOERROR: fstating sieve script /var/lib/imap/sieve/a/a1^co^za/defaultbc: No such file or directory
Mar 23 14:50:52 localhost lmtpunix[5170]: executed
Mar 23 14:50:52 localhost lmtpunix[5054]: duplicate_check: <kzqjoc.ob0i86@localhost>                user.a1^co^za 0
Mar 23 14:50:52 localhost lmtpunix[5170]: accepted connection
Mar 23 14:50:52 localhost lmtpunix[5170]: lmtp connection preauth'd as postman
Mar 23 14:50:52 localhost master[5172]: about to exec /usr/lib/cyrus-imapd/lmtpd
Mar 23 14:50:52 localhost lmtpunix[5170]: IOERROR: fstating sieve script /var/lib/imap/sieve/a/a1^co^za/defaultbc: No such file or directory
Mar 23 14:50:52 localhost lmtpunix[5170]: duplicate_check: <kzqjoc.yi9a6o@localhost>                user.a1^co^za 0
Mar 23 14:50:52 localhost lmtpunix[5172]: executed
Mar 23 14:50:52 localhost lmtpunix[5054]: duplicate_check: <kzqjoc.ob0i86@localhost>                user.a1^co^za 0
Mar 23 14:50:52 localhost lmtpunix[5054]: mystore: starting txn 2147483713
Mar 23 14:50:52 localhost lmtpunix[5054]: mystore: committing txn 2147483713
Mar 23 14:50:52 localhost lmtpunix[5054]: duplicate_mark: <kzqjoc.ob0i86@localhost>                user.a1^co^za 1269348652 3219367188
Mar 23 14:50:52 localhost postfix/smtpd[5157]: disconnect from localhost[127.0.0.1]
Mar 23 14:50:52 localhost postfix/smtpd[5161]: disconnect from localhost[127.0.0.1]
Mar 23 14:50:52 localhost lmtpunix[5054]: Delivered: <kzqjoc.ob0i86@localhost> to mailbox: user.a1^co^za
Mar 23 14:50:52 localhost postfix/pipe[5167]: 6775A2A205E3: to=<a1.co.za@a1.co.za>, orig_to=<iscafax@a1.co.za>, relay=cyrus, delay=0.$
Mar 23 14:50:52 localhost postfix/qmgr[4917]: 6775A2A205E3: removed
Mar 23 14:50:52 localhost lmtpunix[5172]: accepted connection
Mar 23 14:50:52 localhost lmtpunix[5172]: lmtp connection preauth'd as postman
Mar 23 14:50:52 localhost lmtpunix[5172]: IOERROR: fstating sieve script /var/lib/imap/sieve/a/a1^co^za/defaultbc: No such file or directory
Mar 23 14:50:52 localhost lmtpunix[5172]: duplicate_check: <kzqjoc.4qvfxh@localhost>                user.a1^co^za 0
Mar 23 14:50:52 localhost postfix/smtpd[5162]: disconnect from localhost[127.0.0.1]
Mar 23 14:50:53 localhost lmtpunix[5170]: duplicate_check: <kzqjoc.yi9a6o@localhost>                user.a1^co^za 0
Mar 23 14:50:53 localhost lmtpunix[5170]: mystore: starting txn 2147483714
Mar 23 14:50:53 localhost lmtpunix[5170]: mystore: committing txn 2147483714
Mar 23 14:50:53 localhost lmtpunix[5170]: duplicate_mark: <kzqjoc.yi9a6o@localhost>                user.a1^co^za 1269348652 3214460196
Mar 23 14:50:53 localhost lmtpunix[5170]: Delivered: <kzqjoc.yi9a6o@localhost> to mailbox: user.a1^co^za
Mar 23 14:50:53 localhost postfix/pipe[5168]: 60EA22A205DE: to=<a1.co.za@a1.co.za>, orig_to=<iscafax@a1.co.za>, relay=cyrus, delay=0.$
Mar 23 14:50:53 localhost postfix/qmgr[4917]: 60EA22A205DE: removed
Mar 23 14:50:53 localhost lmtpunix[5172]: duplicate_check: <kzqjoc.4qvfxh@localhost>                user.a1^co^za 0
Mar 23 14:50:53 localhost lmtpunix[5172]: mystore: starting txn 2147483715
Mar 23 14:50:53 localhost lmtpunix[5172]: mystore: committing txn 2147483715
Mar 23 14:50:53 localhost lmtpunix[5172]: duplicate_mark: <kzqjoc.4qvfxh@localhost>                user.a1^co^za 1269348652 3214491348
Mar 23 14:50:53 localhost lmtpunix[5172]: Delivered: <kzqjoc.4qvfxh@localhost> to mailbox: user.a1^co^za
Mar 23 14:50:53 localhost postfix/pipe[5167]: 6915D2A205E7: to=<a1.co.za@a1.co.za>, orig_to=<iscafax@a1.co.za>, relay=cyrus, delay=1,$
Mar 23 14:50:53 localhost postfix/qmgr[4917]: 6915D2A205E7: removed
Mar 23 14:51:53 localhost master[3083]: process 5054 exited, status 0
Mar 23 14:51:53 localhost master[3083]: process 5170 exited, status 0
Mar 23 14:51:53 localhost master[3083]: process 5172 exited, status 0
Mar 23 14:51:53 localhost master[5190]: about to exec /usr/lib/cyrus-imapd/lmtpd
Mar 23 14:51:53 localhost lmtpunix[5190]: executed
shaunwinginAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Monis MontherSystem ArchitectCommented:
What do you want it to be??  also post your main.cf confiugration
0
shaunwinginAuthor Commented:
it should simply be iscafax@a1.co.za and not iscafax.a1.co.za
I'm not receiving the mail either.

main.cf: with most comments removed
queue_directory = /var/spool/postfix
command_directory = /usr/sbin
daemon_directory = /usr/libexec/postfix
mail_owner = postfix
myorigin = $mydomain
inet_interfaces = all
unknown_local_recipient_reject_code = 550
mynetworks = /etc/postfix/network_table
alias_maps = hash:/etc/aliases
mailbox_transport = cyrus
debug_peer_level = 2
debugger_command =
         PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin
         xxgdb $daemon_directory/$process_name $process_id & sleep 5
sendmail_path = /usr/sbin/sendmail.postfix
newaliases_path = /usr/bin/newaliases.postfix

# mailq_path: The full pathname of the Postfix mailq command.  This
# is the Sendmail-compatible mail queue listing command.
#
mailq_path = /usr/bin/mailq.postfix

# setgid_group: The group for mail submission and queue management
# commands.  This must be a group name with a numerical group ID that
# is not shared with other accounts, not even with the Postfix account.
#
setgid_group = postdrop

# html_directory: The location of the Postfix HTML documentation.
#
html_directory = no

# manpage_directory: The location of the Postfix on-line manual pages.
#
manpage_directory = /usr/share/man

# sample_directory: The location of the Postfix sample configuration files.
# This parameter is obsolete as of Postfix 2.1.
#
sample_directory = /usr/share/doc/postfix-2.2.2/samples

# readme_directory: The location of the Postfix README files.
#
readme_directory = /usr/share/doc/postfix-2.2.2/README_FILES

virtual_alias_maps = hash:/etc/postfix/virtual

################################
#Ingresado por yb-webadmin
#mydomain = smtp.a1telecoms.co.za
#myhostname = smtp.a1telecoms.co.za

mydomain = a1telecoms.co.za
myhostname = localhost.a1telecoms.co.za


0
shaunwinginAuthor Commented:
Please note that : a1 is short for a1telecoms - I simple truncated the log file.
0
The Ultimate Tool Kit for Technolgy Solution Provi

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy for valuable how-to assets including sample agreements, checklists, flowcharts, and more!

Monis MontherSystem ArchitectCommented:
I could not find something wrong with your main.cf , I am suspecting something wrong with you user names

What is the output of

getent passwd

0
shaunwinginAuthor Commented:
[root@localhost bin]# getent passwd
root:x:0:0:root:/root:/bin/bash
bin:x:1:1:bin:/bin:/sbin/nologin
daemon:x:2:2:daemon:/sbin:/sbin/nologin
adm:x:3:4:adm:/var/adm:/sbin/nologin
lp:x:4:7:lp:/var/spool/lpd:/sbin/nologin
sync:x:5:0:sync:/sbin:/bin/sync
shutdown:x:6:0:shutdown:/sbin:/sbin/shutdown
halt:x:7:0:halt:/sbin:/sbin/halt
mail:x:8:12:mail:/var/spool/mail:/sbin/nologin
news:x:9:13:news:/etc/news:
uucp:x:10:14:uucp:/var/spool/uucp:/sbin/nologin
operator:x:11:0:operator:/root:/sbin/nologin
games:x:12:100:games:/usr/games:/sbin/nologin
gopher:x:13:30:gopher:/var/gopher:/sbin/nologin
ftp:x:14:50:FTP User:/var/ftp:/sbin/nologin
nobody:x:99:99:Nobody:/:/sbin/nologin
mysql:x:27:27:MySQL Server:/var/lib/mysql:/bin/bash
distcache:x:94:94:Distcache:/:/sbin/nologin
vcsa:x:69:69:virtual console memory owner:/dev:/sbin/nologin
apache:x:48:48:Apache:/var/www:/sbin/nologin
rpc:x:32:32:Portmapper RPC user:/:/sbin/nologin
postfix:x:89:89::/var/spool/postfix:/sbin/nologin
cyrus:x:76:12:Cyrus IMAP Server:/var/lib/imap:/bin/bash
ntp:x:38:38::/etc/ntp:/sbin/nologin
mailman:x:41:41:GNU Mailing List Manager:/usr/lib/mailman:/sbin/nologin
rpcuser:x:29:29:RPC Service User:/var/lib/nfs:/sbin/nologin
nfsnobody:x:65534:65534:Anonymous NFS User:/var/lib/nfs:/sbin/nologin
sshd:x:74:74:Privilege-separated SSH:/var/empty/sshd:/sbin/nologin
pcap:x:77:77::/var/arpwatch:/sbin/nologin
dbus:x:81:81:System message bus:/:/sbin/nologin
haldaemon:x:68:68:HAL daemon:/:/sbin/nologin
asterisk:x:100:101:Asterisk VoIP PBX:/var/lib/asterisk:/bin/bash
xfs:x:43:43:X Font Server:/etc/X11/fs:/sbin/nologin
spamfilter:x:500:500::/home/spamfilter:/bin/bash
mailnull:x:47:47::/var/spool/mqueue:/sbin/nologin
smmsp:x:51:51::/var/spool/mqueue:/sbin/nologin
avahi:x:70:70:Avahi daemon:/:/sbin/nologin
nscd:x:28:28:NSCD Daemon:/:/sbin/nologin
avahi-autoipd:x:101:102:avahi-autoipd:/var/lib/avahi-autoipd:/sbin/nologin
gdm:x:42:42::/var/gdm:/sbin/nologin
0
Monis MontherSystem ArchitectCommented:
Ok lets make a simple test.

send a mail from root to root

echo hello |mail -s Test root@a1telecoms.co.za

Now check root's mail by using the mutt of mail or any mail program and check the name it should be correct, if it is so , then the problem is with your virtual aliases, but lets make sure first
0
shaunwinginAuthor Commented:
Tx 4 the info. I've had to send mail by login into my mail server with the method below and this has solved the issue temporarily.
However can you perhaps help explain how to setup postfix to work with my isp's mailserver without having to login into them.
Is there an smtp that I can use to send the mail and how can I setup postfix correctly?
Can Only reply in 10 days  due to festivities - sorry.

postmap hash:/etc/postfix/sasl_passwd

nano /etc/postfix/main.cf
Add the following lines
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
smtp_sasl_security_options =
0
Monis MontherSystem ArchitectCommented:
To relay mail from your server through another server

relay_host=[ip.addr.of.server]

Ofcourse if your ISP requires SASL auth then you need the lines you put above also
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Linux

From novice to tech pro — start learning today.