Find the answer to your Linux question:
Results 1 to 5 of 5
Hi, I've looked through the forum but haven't found any thread related to this topic. The problem: I would like all outgoing email on my Ubuntu server to be redirected ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    May 2010
    Posts
    2

    Redirect all outgoing email messages


    Hi, I've looked through the forum but haven't found any thread related to this topic.

    The problem: I would like all outgoing email on my Ubuntu server to be redirected to one email address. I don't have any mail server installed yet (I'll probably use postfix unless you have another suggestion).

    The reason I would like this to work is because I'm a web developer working on multiple projects. When I start working on a new project I would like to be able to test some of the forms and features in the web application (PHP) without having emails sent to the email address configured in the application. I can always change configurations but this would save me lots of trouble.

    Please let me know if this is possible. If you need any additional information feel free to let me know.

    Thanks,
    Pat

  2. #2
    Linux User ptkobe's Avatar
    Join Date
    Feb 2008
    Location
    Torres Vedras, PT
    Posts
    276
    Quote Originally Posted by iDev247 View Post
    Hi, I've looked through the forum but haven't found any thread related to this topic.

    The problem: I would like all outgoing email on my Ubuntu server to be redirected to one email address. I don't have any mail server installed yet (I'll probably use postfix unless you have another suggestion).

    The reason I would like this to work is because I'm a web developer working on multiple projects. When I start working on a new project I would like to be able to test some of the forms and features in the web application (PHP) without having emails sent to the email address configured in the application. I can always change configurations but this would save me lots of trouble.

    Please let me know if this is possible. If you need any additional information feel free to let me know.

    Thanks,
    Pat
    Hi,

    I'm not an email expert. I was just looking for the many unanswered questions on this forum.

    So, here's a thought. Can't you do that with dns? If it was form to http, a line on /etc/hosts saying example.com is, say, 127.0.0.1 will do, I think (?).

    That or similar will not do for mail: post actions?

    regards
    Luis

  3. #3
    Linux Enthusiast scathefire's Avatar
    Join Date
    Jan 2010
    Location
    Western Kentucky
    Posts
    626
    Quote Originally Posted by ptkobe View Post
    Hi,

    So, here's a thought. Can't you do that with dns? If it was form to http, a line on /etc/hosts saying example.com is, say, 127.0.0.1 will do, I think (?).
    Email require DNS lookups, they have to find a MX record to deliver to. even if you did redirect the email to a given server, that server would have to be set up to receive email for the domain. Otherwise it will reject it
    linux user # 503963

  4. $spacer_open
    $spacer_close
  5. #4
    Just Joined!
    Join Date
    May 2010
    Posts
    2
    The issue I'm having is that the list of emails could be large (2000+) so I would need some soft of wildcard for all email addresses on any domain name.

    This would be on my development server so all emails sent by the server do not need to go to be go outside my LAN network.

    I'm still not sure of the solution. My server also has DNS server installed if anyone knows a wildcard mx record.

    Any suggestions?

  6. #5
    Linux User ptkobe's Avatar
    Join Date
    Feb 2008
    Location
    Torres Vedras, PT
    Posts
    276
    Allow me to be a bit basic. Apologies in advance.

    Don't you have a routine that process the form and sends the email?

    Can't you add a
    if ($global_var_test) then
    //change the destination to your local email. And maybe add the testing destination to the subject?
    endif

    Trying to help, I have to ask
    Luis

    PS: Thanks, scathefire, for your reply.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •