LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 11-22-2007, 02:47 AM   #1
Haiyadragon
Member
 
Registered: Sep 2003
Location: Gorredijk, Netherlands
Distribution: Arch Linux
Posts: 400

Rep: Reputation: 30
Redirect outgoing mail


Hi guys,

I'm trying to setup my development machine to redirect all outgoing mail to my local inbox. I work on a lot of php sites that send lots of mail and I need none of that to actually leave my pc, but I need to be able to debug them.

I've searched my ass off on google but can't find anything. On Windows I used DevNull SMTP (http://www.aboutmyip.com/AboutMyXApp/DevNullSmtp.jsp), but it would be better if I could see the messages in mutt (or other mail client).

So, any ideas on how to accomplish this?

Thanks in advance for any hints.
 
Old 11-22-2007, 08:42 PM   #2
billymayday
LQ Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
Do you cae about incoming mail? You don't say what MTA you're using, so that makes it hard.

It may work to simply alias all addresses to yourself. How depends on the MTA
 
Old 11-23-2007, 11:24 AM   #3
Haiyadragon
Member
 
Registered: Sep 2003
Location: Gorredijk, Netherlands
Distribution: Arch Linux
Posts: 400

Original Poster
Rep: Reputation: 30
I don't get incoming mail directly to my pc so that's not a problem.

PHP calls sendmail by default. I have postfix installed. I could use something else, it doesn't really matter.

How do I alias all addresses to myself with postfix?
 
Old 11-23-2007, 08:56 PM   #4
billymayday
LQ Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
Actually, I can't find a simple way to do it. Aliases only work on local delivery, and I'm having trouble finding a way to force everything local (for example mydestination = * won't work).

No so sure now

I'll keep playing
 
Old 11-25-2007, 05:51 PM   #5
Berhanie
Senior Member
 
Registered: Dec 2003
Location: phnom penh
Distribution: Fedora
Posts: 1,625

Rep: Reputation: 165Reputation: 165
You could do something like this:
Code:
default_transport = local
luser_relay = bob
This would mail (almost) everything to the local user bob

Last edited by Berhanie; 11-25-2007 at 05:53 PM.
 
Old 11-27-2007, 02:48 AM   #6
Haiyadragon
Member
 
Registered: Sep 2003
Location: Gorredijk, Netherlands
Distribution: Arch Linux
Posts: 400

Original Poster
Rep: Reputation: 30
I really appreciate it. But could you define "almost everything" for me?
 
Old 11-27-2007, 09:07 PM   #7
Berhanie
Senior Member
 
Registered: Dec 2003
Location: phnom penh
Distribution: Fedora
Posts: 1,625

Rep: Reputation: 165Reputation: 165
Destination addresses in other address classes (local, virtual_mailbox, relay) are still delivered as usual. The same is true of addresses that have an explicit transport defined in the transport table.

For example, mail to the local user mary will be delivered to to /var/spool/mail/mary. In fact, since the local delivery agent doesn't look at domains, mail to mary@<any-domain> will be delivered to /var/spool/mail/mary.
 
Old 11-28-2007, 12:11 AM   #8
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,359

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
Normally if I'm doing dev, I just have the email addr in a cfg file, so set it to me@localhost (or alias thereof).
When you deliver the site, just change the cfg file entry (if you need to deliver the cfg file again).
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
outgoing mail aliases? soylentgreen Linux - Server 1 07-03-2007 08:29 PM
spooled outgoing mail UltramaticOrange Linux - Networking 8 04-25-2006 09:17 PM
sendmail and outgoing mail shafey Linux - Networking 1 11-16-2005 04:57 AM
How to separate Incoming Mail and Outgoing Mail on SENDMAIL LiloAma Linux - Networking 1 03-22-2004 02:24 AM
sendmail outgoing mail karunesh Linux - General 0 11-17-2003 02:19 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 10:54 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration