Community Forums
Connect with us on LinkedIn
Community Notice
+ Reply to Thread
Results 1 to 8 of 8
  1. #1
    Member
    Join Date
    Oct 2001
    Posts
    97

    Default Sending Mail As user@domain.com

    Hi,

    I just set up an additional Cpanel server on Centos5.

    I configured the server to run with phpsuexec.

    Mail being sent from user's crons and scripts is being sent from:
    user@hostname.server.com

    rather than
    user@userdomain.com

    Can anyone point me in the right direction on how to make mail send from the user's domain rather than server's hostname?


    Thanks!

  2. #2
    Member
    Join Date
    Sep 2004
    Posts
    887

    Default

    Quote Originally Posted by SonServers View Post
    Hi,

    I just set up an additional Cpanel server on Centos5.

    I configured the server to run with phpsuexec.

    Mail being sent from user's crons and scripts is being sent from:
    user@hostname.server.com

    rather than
    user@userdomain.com

    Can anyone point me in the right direction on how to make mail send from the user's domain rather than server's hostname?


    Thanks!
    That's normal. If it is cron scripts sending mail, it does not matter that the FROM address is user@hostname.server.com - nobody is going to reply to cron emails.

    Mail being sent from user scripts is usually only snet as user@hostname.server.com if the scripts themselves do not specify a specific sender address in their configuration.

    Mike

  3. #3
    Member
    Join Date
    Oct 2001
    Posts
    97

    Default

    Thanks Mike,

    My problem is not in a need to reply to cron's mail, but when mailing to a remote server that has sender verify. When sending to another server that is verifying senders, the email fails because user@hostname.server.com does not exist on the sending server.

  4. #4
    Member
    Join Date
    Sep 2004
    Posts
    887

    Default

    Quote Originally Posted by SonServers View Post
    Thanks Mike,

    My problem is not in a need to reply to cron's mail, but when mailing to a remote server that has sender verify. When sending to another server that is verifying senders, the email fails because user@hostname.server.com does not exist on the sending server.
    I don't have an answer for that one. The user account email shoudl be created with each account creation.

    For instance, if I add the domain mikelikeshisnew22inchlcdmonitor.com to the machine cpanel.mikesmediocrewebhosting.com and the account login associated with that is 'mike22', I can then send an email to mike22@@cpanel.mikesmediocrewebhosting.com and the email will end up in /home/mike22/mail/new

    Mike

  5. #5
    Member
    Join Date
    Oct 2001
    Posts
    97

    Default

    Oh, ok . . . I have Radio Head's Deluxe ASSP running. It automatically adds the allow for user@domain but not user@hostname.

    I asked him about it and got a reply, that user@domain is added, but I don't think he understood I was sending from user@hostname. The longer I thought about it I began to think that maybe sending as user@domain is the way it "should" be sending and that sending as user@hostname is a config issue on the server.

  6. #6
    Member
    Join Date
    Sep 2004
    Posts
    887

    Default

    Quote Originally Posted by SonServers View Post
    Oh, ok . . . I have Radio Head's Deluxe ASSP running. It automatically adds the allow for user@domain but not user@hostname.

    I asked him about it and got a reply, that user@domain is added, but I don't think he understood I was sending from user@hostname. The longer I thought about it I began to think that maybe sending as user@domain is the way it "should" be sending and that sending as user@hostname is a config issue on the server.
    I'm not sure of why it is like it is - however, one guess is that there would be no way for PHP to know to send from user@domain.com unless the script actually has that coded in it - whereby, it knows to send out emails that don't have a specific sender address supplied by using simply 'user' as the FROM address. And the server hostname gets tacked on to the end of those addresses that don't contain a fully qualified hostname/domain name at the end.

    So it's not a flaw of PHP or of Cpanel - Cpanel accounts for this by having a default account set up. Whether that changes with the use of ASSP is something ASSP needs to account for, or something you need to account for in ASSP's config

    Mike

  7. #7
    Member This forum account has been confirmed by cPanel staff to represent a vendor. Radio_Head's Avatar
    Join Date
    Feb 2002
    Posts
    2,057

    Default

    If you want allow user@server.hostname.com

    pico /usr/local/assp/deluxe/assp_catch_all
    and add a line with
    @server.hostname.com

    When the update_email.php will be executed (each 3 minutes by default) , @server.hostname.com will be added to assp_local_email and
    user@server.hostname.com will be allowed by assp.

    Negative point : you may receive email dictionary attacks to your @server.hostname.com .

    so , other simple solution , if you are having this problem because your user is not receiving cronjob email notification ,
    simply edit the client cron with

    crontab -e -u username

    and at the top of client cron add this line
    MAILTO="clientemail@domain.com"

    The cronjob will be sent to MAILTO="clientemail@domain.com" instead of default
    user@hostname

    If the problem is not only cron but also scripts , then allow @server.hostname.com as explained above.


    Bye
    Last edited by Radio_Head; 10-24-2007 at 03:32 AM.
    Stop SPAM & VIRUS :: ASSP Deluxe for cPanel http://www.grscripts.com
    █ ASSP Deluxe is supported by Fritz Borgstedt,ASSP main developer.

  8. #8
    Member
    Join Date
    Oct 2001
    Posts
    97

    Default

    Thanks Radio_Head . . . adding the server hostname to the catch all file worked. The outgoing emails now pass the receiving server's sender verify.

    That really was the only problem, getting them to pass sender verification on the other side.

    Thanks again to both of you who responded.


Similar Threads & Tags
Similar threads

  1. Which user is sending mail massive
    By pablolibo in forum E-mail Discussions
    Replies: 2
    Last Post: 11-07-2009, 03:31 AM
  2. How to ban user sending mail from sendmail.
    By mail2sacp in forum New User Questions
    Replies: 1
    Last Post: 08-19-2007, 06:17 PM
  3. User nobody sending mail - Which account is it?
    By redlorry919 in forum cPanel and WHM Discussions
    Replies: 4
    Last Post: 09-12-2005, 01:16 PM
  4. prevent user nobody from sending out mail
    By cazny in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 09-12-2004, 12:36 PM
  5. EXIM sending mail to the wrong user!
    By gordita in forum cPanel and WHM Discussions
    Replies: 10
    Last Post: 02-05-2002, 10:46 PM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube