Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 212980

Summary: Is it still possible to send mail from *.eclipse.org vservers?
Product: Community Reporter: Nick Boldt <nboldt>
Component: MailAssignee: Eclipse Webmaster <webmaster>
Status: RESOLVED FIXED QA Contact:
Severity: minor    
Priority: P3    
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard:
Bug Depends on:    
Bug Blocks: 208122, 210396    
Attachments:
Description Flags
console output showing problems sending mail from emft.eclipse.org none

Description Nick Boldt CLA 2007-12-14 01:48:41 EST
I used to be able to use php's mail() function to call out to `sendmail -t -i` to deliver notifications of builds and promotes being done.

Some time after July 26, 2007, this stopped working.

I presume this is to cut down on spoofing, spam, and mail relaying, which is totally understandable. How can I *legally* send mail from emft.eclipse.org for delivery to the outside world? Is there a relay server I can use? A valid port number that will allow mail delivery? Some other magical incantation?

See attached for a few options I've tried, none of which work. This includes:

* php mail() to sendmail on localhost (emft.eclipse)
* sendmail directly on localhost (emft.eclipse)
* netcat to emft.eclipse:25 from emft.eclipse
* netcat to mail.eclipse:25 from emft.eclipse

That said, I **can send mail** from build.eclipse.org using php mail() and sendmail directly. 

If it's impossible to open the vservers to being able to send mail again, I can cobble a web-based or ssh-based mechanism for sending mail regarding builds on emft.eclipse.org from build.eclipse.org. It'll be a bit of a hack to have one server use the other for mail delivery, but I suppose it'll work in a pinch.

Thoughts?
Comment 1 Nick Boldt CLA 2007-12-14 02:30:20 EST
Created attachment 85256 [details]
console output showing problems sending mail from emft.eclipse.org
Comment 2 Denis Roy CLA 2007-12-14 08:23:45 EST
Mail is a really nasty thing, and one faux-pas can lead us to being added to SPAM blacklists and getting nasty hatemail from people.

Your idea to relay through mail.eclipse.org is a good one; however, as the vservers are on a separate subnet, I'll need to add it to our Postfix conf.

I'll test the new setting today, so by the days end you should be able to relay through mail.eclipse.org.
Comment 3 Nick Boldt CLA 2007-12-14 11:56:37 EST
(In reply to comment #2)
> Mail is a really nasty thing, and one faux-pas can lead us to being added to
> SPAM blacklists and getting nasty hatemail from people.
> 
> Your idea to relay through mail.eclipse.org is a good one; however, as the
> vservers are on a separate subnet, I'll need to add it to our Postfix conf.
> 
> I'll test the new setting today, so by the days end you should be able to relay
> through mail.eclipse.org.

So then the implementation here is to use netcat to open port 25 and relay directly to mail.eclipse.org? 

I suppose I could also use php to open a socket and send that way [1]. 

[1]http://www.php.net/manual/en/ref.mail.php#75708

Is there any extra security you want me to use? TLS? non-standard port? auth login?
Comment 4 Denis Roy CLA 2007-12-14 13:11:42 EST
> So then the implementation here is to use netcat to open port 25 and relay
> directly to mail.eclipse.org? 

Gawds no.  Just tell your MTA to use mail.eclipse.org as a relay host.  If you're using Postfix, it's .. relayhost=mail.eclipse.org.  If you're using sendmail, well, you likely have bigger problems :)
Comment 5 Nick Boldt CLA 2007-12-14 15:33:54 EST
(In reply to comment #4)
> > So then the implementation here is to use netcat to open port 25 and relay
> > directly to mail.eclipse.org? 
> 
> Gawds no.  Just tell your MTA to use mail.eclipse.org as a relay host.  If
> you're using Postfix, it's .. relayhost=mail.eclipse.org.  If you're using
> sendmail, well, you likely have bigger problems :)
> 

Success!

1. edit /etc/mail/sendmail.cf

  # "Smart" relay host (may be null)
  DSmail.eclipse.org

2. restart sendmail

3. test w/ /usr/sbin/sendmail -t -v ... message received.