Koozali.org: home of the SME Server

using registrar's email service - mail is looping - solved

Offline quayph

  • *
  • 13
  • +0/-0
using registrar's email service - mail is looping - solved
« on: March 09, 2007, 11:38:30 AM »
I am using SME7 to host multiple websites on different domains.

Using the DNS Zone controls, example.com is set up to send website requests to my server and email to the domain registrar's own email service.
I hope to avoid having to host the client's email, as the registrar provides 2gb of mailbox space.

This works fine for mail coming from any external mail server. The problem occurs when I want to send mail from a PHP script to myclient@example.com

The SME server sees that example.com is one of the domains it hosts and tries to deliver the mail locally.

I have tried creating an account "myclient" and setting it to deliver mail remotely to  myclient@example.com but the same problem keeps happening.

Here is a bit of the log /var/log/qmail/current
the domain in question is sitescom.eu

@4000000045f1335b1bd8d284 new msg 6031079
@4000000045f1335b1bd8e224 info msg 6031079: bytes 341 from <anonymous@sitescom.eu> qp 2201 uid 102
@4000000045f1335b1c2a9fec starting delivery 347: msg 6031079 to local alias-localdelivery-ks@sitescom.eu
@4000000045f1335b1c2aaba4 status: local 1/10 remote 0/20
@4000000045f1335b1ccdd914 new msg 6031294
@4000000045f1335b1ccde4cc info msg 6031294: bytes 457 from <anonymous@sitescom.eu> qp 2204 uid 400
@4000000045f1335b1d173a3c starting delivery 348: msg 6031294 to local ks@ss01-50.sitescom.eu
@4000000045f1335b1d1745f4 status: local 2/10 remote 0/20
@4000000045f1335b1d174dc4 delivery 347: success: forward:_qp_2204/did_0+0+1/
@4000000045f1335b1d175594 status: local 1/10 remote 0/20
@4000000045f1335b1d175d64 end msg 6031079
@4000000045f1335b1dc2a50c new msg 6031079
@4000000045f1335b1dc2acdc info msg 6031079: bytes 564 from <anonymous@sitescom.eu> qp 2208 uid 5006
@4000000045f1335b1e1fb15c starting delivery 349: msg 6031079 to local alias-localdelivery-ks@sitescom.eu
@4000000045f1335b1e1fbd14 status: local 2/10 remote 0/20
@4000000045f1335b1e1fc4e4 delivery 348: success: did_0+1+1/qp_2208/
@4000000045f1335b1e1fccb4 status: local 1/10 remote 0/20
@4000000045f1335b1e1fd484 end msg 6031294
@4000000045f1335b1e61dec4 delivery 349: failure: This_message_is_looping:_it_already_has_my_Delivered-To_line._(#5.4.6)/
@4000000045f1335b1e61ee64 status: local 0/10 remote 0/20
@4000000045f1335b1ebbc664 bounce msg 6031079 qp 2210
@4000000045f1335b1ebbce34 end msg 6031079
@4000000045f1335b1ebf930c new msg 6031296
@4000000045f1335b1ec167cc info msg 6031296: bytes 1119 from <> qp 2210 uid 406
@4000000045f1335b1ef8ac3c starting delivery 350: msg 6031296 to local alias-localdelivery-anonymous@sitescom.eu
@4000000045f1335b1efaa80c status: local 1/10 remote 0/20
@4000000045f1335b1f84fe1c new msg 6031297
@4000000045f1335b1f850dbc info msg 6031297: bytes 1242 from <> qp 2213 uid 400
@4000000045f1335b1fd27a0c starting delivery 351: msg 6031297 to local anonymous@ss01-50.sitescom.eu
@4000000045f1335b1fd285c4 status: local 2/10 remote 0/20
@4000000045f1335b1fd289ac delivery 350: success: forward:_qp_2213/did_0+0+1/
@4000000045f1335b1fd2917c status: local 1/10 remote 0/20
@4000000045f1335b1fd29564 end msg 6031296
@4000000045f1335b207cd754 new msg 6031079
@4000000045f1335b207ce30c info msg 6031079: bytes 1355 from <> qp 2217 uid 101
@4000000045f1335b20cbb2d4 starting delivery 352: msg 6031079 to local alias-localdelivery-ks@sitescom.eu
@4000000045f1335b20cbbe8c status: local 2/10 remote 0/20
@4000000045f1335b20cbc274 delivery 351: success: did_0+1+1/qp_2217/
@4000000045f1335b20cbca44 status: local 1/10 remote 0/20
@4000000045f1335b20cbce2c end msg 6031297
@4000000045f1335b21a8e3d4 new msg 6031294
@4000000045f1335b21a8eba4 info msg 6031294: bytes 1471 from <> qp 2220 uid 400
@4000000045f1335b21f13b5c starting delivery 353: msg 6031294 to local ks@ss01-50.sitescom.eu
@4000000045f1335b21f2931c status: local 2/10 remote 0/20
@4000000045f1335b21f47f4c delivery 352: success: forward:_qp_2220/did_0+0+1/
@4000000045f1335b21f663ac status: local 1/10 remote 0/20
@4000000045f1335b21f88a74 end msg 6031079
@4000000045f1335b228b604c new msg 6031079
@4000000045f1335b228c94e4 info msg 6031079: bytes 1578 from <> qp 2224 uid 5006
@4000000045f1335b22cb47ac starting delivery 354: msg 6031079 to local alias-localdelivery-ks@sitescom.eu
@4000000045f1335b22cc8fcc status: local 2/10 remote 0/20
@4000000045f1335b22ce60a4 delivery 353: success: did_0+1+1/qp_2224/
@4000000045f1335b22d03d34 status: local 1/10 remote 0/20
@4000000045f1335b22d27b6c end msg 6031294
@4000000045f1335b22dfc1dc delivery 354: failure: This_message_is_looping:_it_already_has_my_Delivered-To_line._(#5.4.6)/
@4000000045f1335b22e22b0c status: local 0/10 remote 0/20
@4000000045f1335b233ad25c bounce msg 6031079 qp 2226
@4000000045f1335b233d04dc end msg 6031079
@4000000045f1335b233ff6c4 new msg 6031296
@4000000045f1335b2340ecdc info msg 6031296: bytes 2043 from <#@[]> qp 2226 uid 406
@4000000045f1335b2396c184 starting delivery 355: msg 6031296 to local alias-localdelivery-postmaster@sitescom.eu
@4000000045f1335b239805bc status: local 1/10 remote 0/20
@4000000045f1335b2442b50c new msg 6031297
@4000000045f1335b24441884 info msg 6031297: bytes 2167 from <#@[]> qp 2229 uid 400
@4000000045f1335b24ad80e4 starting delivery 356: msg 6031297 to local postmaster@ss01-50.sitescom.eu
@4000000045f1335b24aec134 status: local 2/10 remote 0/20
@4000000045f1335b24b4b88c delivery 355: success: forward:_qp_2229/did_0+0+1/
@4000000045f1335b24b4c05c status: local 1/10 remote 0/20
@4000000045f1335b24b4c82c end msg 6031296
@4000000045f1335b253c574c new msg 6031079
@4000000045f1335b253d7c44 info msg 6031079: bytes 2281 from <#@[]> qp 2233 uid 101
@4000000045f1335b2577647c starting delivery 357: msg 6031079 to local alias-localdelivery-ks@sitescom.eu
@4000000045f1335b2578ac9c status: local 2/10 remote 0/20
@4000000045f1335b257a8544 delivery 356: success: did_0+1+1/qp_2233/
@4000000045f1335b257c65bc status: local 1/10 remote 0/20
@4000000045f1335b257e983c end msg 6031297
@4000000045f1335b2606e2dc new msg 6031294
@4000000045f1335b260803ec info msg 6031294: bytes 2397 from <#@[]> qp 2236 uid 400
@4000000045f1335b2642d29c starting delivery 358: msg 6031294 to local ks@ss01-50.sitescom.eu
@4000000045f1335b264416d4 status: local 2/10 remote 0/20
@4000000045f1335b2645eb94 delivery 357: success: forward:_qp_2236/did_0+0+1/
@4000000045f1335b2647c824 status: local 1/10 remote 0/20
@4000000045f1335b2649e71c end msg 6031079
@4000000045f1335b26ddf18c new msg 6031079
@4000000045f1335b26df129c info msg 6031079: bytes 2504 from <#@[]> qp 2240 uid 5006
@4000000045f1335b271abff4 starting delivery 359: msg 6031079 to local alias-localdelivery-ks@sitescom.eu
@4000000045f1335b271c0044 status: local 2/10 remote 0/20
@4000000045f1335b271dd11c delivery 358: success: did_0+1+1/qp_2240/
@4000000045f1335b272070fc status: local 1/10 remote 0/20
@4000000045f1335b2724c65c end msg 6031294
@4000000045f1335b2732996c delivery 359: failure: This_message_is_looping:_it_already_has_my_Delivered-To_line._(#5.4.6)/
@4000000045f1335b2732a524 status: local 0/10 remote 0/20
@4000000045f1335b2732a90c triple bounce: discarding bounce/6031079
@4000000045f1335b2732b0dc end msg 6031079

Does anyone have any idea how to make this setup work?

Offline bpivk

  • *
  • 908
  • +0/-0
    • http://www.bezigrad.com
using registrar's email service - mail is looping - solved
« Reply #1 on: March 09, 2007, 11:52:15 AM »
db domains setprop sitescom.eu MailServer someip
signal-event email-update

MailServer is the IP address of the SMTP host.

This will send all mail to SMTP host at someip but will deliver all the rest locally.

I hope that this is what you were looking for.
"It should just work" if it doesn't report it. Thanks!

Offline quayph

  • *
  • 13
  • +0/-0
using registrar's email service - mail is looping - solved
« Reply #2 on: March 09, 2007, 12:12:37 PM »
Wow, thanks for the super quick reply :)

the log now says:

@4000000045f13e1e1633384c new msg 6031156
@4000000045f13e1e16334404 info msg 6031156: bytes 341 from <anonymous@sitescom.eu> qp 4307 uid 102
@4000000045f13e1e167b2e2c starting delivery 385: msg 6031156 to remote ks@sitescom.eu
@4000000045f13e1e167b6cac status: local 0/10 remote 1/20
@4000000045f13e1e29c64c3c delivery 385: failure: 80.168.44.12_does_not_like_recipient./Remote_host_said:_550-Verification_failed_for_<anonymous@sitescom.eu>/550-"anonymous@sitescom.eu"_is_not_a_known_user/550_Sender_verify_failed/Giving_up_on_80.168.44.12./
@4000000045f13e1e29c95d64 status: local 0/10 remote 0/20
@4000000045f13e1e2a284a2c bounce msg 6031156 qp 4309
@4000000045f13e1e2a2851fc end msg 6031156
@4000000045f13e1e2a2ca75c new msg 6031305
@4000000045f13e1e2a2caf2c info msg 6031305: bytes 1033 from <> qp 4309 uid 406
@4000000045f13e1e2a74668c starting delivery 386: msg 6031305 to remote anonymous@sitescom.eu
@4000000045f13e1e2a747244 status: local 0/10 remote 1/20
@4000000045f13e1e36d15534 delivery 386: failure: 80.168.44.12_does_not_like_recipient./Remote_host_said:_550_"anonymous@sitescom.eu"_is_not_a_known_user/Giving_up_on_80.168.44.12./
@4000000045f13e1e36d49d0c status: local 0/10 remote 0/20
@4000000045f13e1e3728eefc bounce msg 6031305 qp 4311
@4000000045f13e1e372a7d6c end msg 6031305
@4000000045f13e1e372ea004 new msg 6031300
@4000000045f13e1e372f9a04 info msg 6031300: bytes 1565 from <#@[]> qp 4311 uid 406
@4000000045f13e1e3765c14c starting delivery 387: msg 6031300 to remote postmaster@sitescom.eu
@4000000045f13e1e37671cf4 status: local 0/10 remote 1/20
@4000000045f13e1f138ef734 delivery 387: success: 80.168.44.12_accepted_message./Remote_host_said:_250_OK_id=1HPcov-00056O-0V/
@4000000045f13e1f138f02ec status: local 0/10 remote 0/20
@4000000045f13e1f138f0abc end msg 6031300

So at least the mail was sent as far as the remote mail server.
Now I just need to figure out why the mail is sent from  "anonymous@sitescom.eu" and not from the address I put in the from header in the php script :
mail('ks@sitescom.eu', 'subject', 'message', "From: siteadmin@sitescom.eu\n");

Once again, thankyou for your amazingly quick response.

Offline quayph

  • *
  • 13
  • +0/-0
using registrar's email service - mail is looping - solved
« Reply #3 on: March 09, 2007, 02:08:07 PM »
Adding the header "Return-Path: ks@sitescom.eu" solved the problem.

Thanks for your help