anonymous@domain-name change - how ??

Posted on 2011-09-24
Last Modified: 2012-06-27
how do I change my linux server return-path email address?

centos is our OS
emails are generated by our php script - example: welcome message goes out when a user join our site

the bounce messages show that the return path is anonymous@domain-name

the from field shows no-reply@domain-name
that is how we set it up,, but we are wondering where the anonymous@domain-name is coming from so that we can adjust it

whatever help will be appreciated.

thank you.
Question by:U_S_A
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
LVL 21

Expert Comment

ID: 36593145
The Return-Path header is added by the server that is the final hop before delivery to the mailbox.  That header is populated from the address given in the MAIL FROM envelope header.

Change your MAIL FROM header to whatever you want Return-Path to be.

BTW which MTA are you using?

Author Comment

ID: 36593164
MAIL FROM - would that be in the PHP script or somewhere else?

MTA ?    I don't know what that is ...

we have qmail - is that related to MTA ?
LVL 21

Accepted Solution

Papertrip earned 500 total points
ID: 36593258
I'm no PHP pro, but I am an email pro, so I did some quick research for ya.  And yes qmail is an MTA.


additional_parameters (optional)

    The additional_parameters parameter can be used to pass additional flags as command line options to the program configured to be used when sending mail, as defined by the sendmail_path configuration setting. For example, this can be used to set the envelope sender address when using sendmail with the -f sendmail option.

    The user that the webserver runs as should be added as a trusted user to the sendmail configuration to prevent a 'X-Warning' header from being added to the message when the envelope sender (-f) is set using this method. For sendmail users, this file is /etc/mail/trusted-users.
Example #3 Sending mail with an additional command line parameter.

The additional_parameters parameter can be used to pass an additional parameter to the program configured to use when sending mail using the sendmail_path.
mail('', 'the subject', 'the message', null,
How the mail function routes to the MTA as set in php.ini:
sendmail_path string

    Where the sendmail program can be found, usually /usr/sbin/sendmail or /usr/lib/sendmail. configure does an honest attempt of locating this one for you and set a default, but if it fails, you can set it here.

    Systems not using sendmail should set this directive to the sendmail wrapper/replacement their mail system offers, if any. For example, » Qmail users can normally set it to /var/qmail/bin/sendmail or /var/qmail/bin/qmail-inject.
From qmail-inject man page:
          Pass sender  to  qmail-queue  as  the  envelope  sender
          address.   This  overrides Return-Path and all environ-
          ment variables.

WordPress Tutorial 4: Recommended Plugins

Now that you have WordPress installed, understand the interface, and know how to install new parts, let’s take a look at our recommended plugins.

LVL 83

Expert Comment

by:Dave Baldwin
ID: 36593305
The 'From:' and '-f' email addresses may need to be valid email addresses that can be looked up by the receiving server to prevent them from bouncing.
LVL 21

Expert Comment

ID: 36593508
Hey Dave,

Receiving servers do no such look up :)  It's the sending servers responsibility to properly populate those headers.
LVL 83

Expert Comment

by:Dave Baldwin
ID: 36593627
Yes, you have to fill them when sending.  But we have had a lot of questions here about mail servers checking for valid email addresses in received emails.  Email servers do a lot of filtering on received email to minimize spam.  And some SMTP servers on web hosting will not send an email that doesn't have an email address that is valid for that domain.

More info:
LVL 21

Expert Comment

ID: 36593641
I am well-versed in anti-spam techniques and have helped write some RFC's on the matter as well :)

The link you posted only pertains to the domain and IP of the sending server, and has nothing to do with the email address itself being a valid user/mailbox.
LVL 83

Expert Comment

by:Dave Baldwin
ID: 36593693
You may have done all those things and I may have overstated my suggestion.  But I stand by it as a generally good idea and it's simpler than trying to explain all the things about email.  Feel free to make a better suggestion.
LVL 21

Expert Comment

ID: 36593697
My only suggestion is to make sure to fill in the headers properly while constructing the mail :)

Didn't mean to invoke any animosity if that is the case, I only commented on your reply so that the Asker and yourself have all the correct info.  Since I joined EE I have learned a ton from reading other experts answers to questions I had thought I knew the complete answer to.
LVL 83

Expert Comment

by:Dave Baldwin
ID: 36593730
In that case, OK, and I have to say that I too learned things here I thought I already knew.  Which is mostly why I'm here.  Answering questions is the best way to learn and 'relearn'.
LVL 21

Expert Comment

ID: 36593743
Completely agree.
LVL 110

Expert Comment

by:Ray Paseur
ID: 36593898
Here from left field is a different view on the issue.  

Don't even bother to send your own emails.  

Instead, use a professional service like which is in the for-profit business of sending emails on your behalf.  Embarrassingly inexpensive and highly efficient.  If your time is worth anything, you will quickly find that debugging email is a non-value-added activity.  Constant Contact has full-time employees who handle the hard part of email.  This recommendation comes from someone who has sent thousands of emails a week for many years and who has "seen the light" about the difficulty of getting automated email to work and the ease-of-use of Constant Contact.  They will help you comply with the law, avoid spam filters, track who opens and forwards the message, all kinds of things like that.  In my experience it is the right way to go.  There are competitors like MailChimp and others but I have been happy with Constant Contact and so have my clients, who range from tall-steeple churches to multi-billion dollar investment management firms.

HTH, ~Ray

Featured Post

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

As tax season makes its return, so does the increase in cyber crime and tax refund phishing that comes with it
Sometimes clients can lose connectivity with the Lotus Notes Domino Server, but there's not always an obvious answer as to why it happens.   Read this article to follow one of the first experiences I had with Lotus Notes on a client's machine, my…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

623 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question