View Issue Details

IDProjectCategoryView StatusLast Update
0019511mantisbtemailpublic2015-04-13 15:03
Reporterfgmind Assigned Toatrol  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionno change required 
PlatformLinuxOSDebianOS Version7.8
Product Version1.2.19 
Summary0019511: your envelope sender is in my badmailfrom list
Description

Hello
I'm trying to configure email notifications but can't receive any in inbox. Emails stays in mail_queue.

First i had "SMTP Error: Could not connect to SMTP host.", then i made some changes and it became:
"SMTP Error: The following recipients failed: fgmind@gmail.com

SMTP server error: sorry, your envelope sender is in my badmailfrom list (0000005.7.1)"

My mail server is on OVH, and there is no blacklist.

Steps To Reproduce

$g_phpMailer_method = PHPMAILER_METHOD_SMTP;
$g_smtp_host = "ns0.ovh.net";
$g_smtp_username = "mantis@company.com";
$g_smtp_password = "Azertyuiop";
$g_smtp_connection_mode = "ssl";
$g_smtp_port = 465;
$g_from_email = "name.firstname@company.com";
$g_from_name = "Ticketing Soft";

Tried with connection_mode SSL or TLS, ports 465 and 587, PHPMAILER_METHOD_SMTP, MAIL and SENDMAIL.
But nothing worked. I maybe missed a step..

Test_mail give me "Testing Mail - PROBLEMS SENDING MAIL TO: fgmind@gmail.com. Please check your php/mail server settings."

TagsNo tags attached.

Activities

fgmind

fgmind

2015-03-17 12:17

reporter   ~0049247

Working if a configure it to send from a gmail adress with smtp.gmail.com:587 with TLS.

atrol

atrol

2015-03-17 13:53

developer   ~0049252

Last edited: 2015-03-17 13:53

Working if a configure it to send from a gmail adress with smtp.gmail.com:587 with TLS.
Which means that this is obviously a problem with your SMTP provider $g_smtp_host = "ns0.ovh.net"; and not a MantisBT issue

fgmind

fgmind

2015-03-18 10:20

reporter   ~0049259

The thing is, when i create a .php which send an email (contains this), it works fine.
But with same settings, mantis don't.

<?php

ini_set("include_path",".:/var/www/mantis/library/phpmailer/");

require("class.phpmailer.php");

$mail = new PHPMailer();

$mail->IsSMTP();
$mail->SMTPAuth = true; // enable SMTP authentication
$mail->Username = "mantis@fgmind.com"; // username
$mail->Password = "Azerty";
$mail->SMTPSecure = "ssl";
$mail->Host = "ssl0.ovh.net"; // sets as the SMTP server
$mail->Port = 465; // set the SMTP port

Still have the badmailfrom error

atrol

atrol

2015-03-18 12:45

developer   ~0049262

Does your test script still work if you add the following lines?

$mail->AddCustomHeader('Auto-Submitted:auto-generated');
$mail->AddCustomHeader('X-Auto-Response-Suppress: All');

fgmind

fgmind

2015-03-19 05:24

reporter   ~0049270

Yes, works if i add this (even if i don't really understood what it is for).

But i found a solution for this badmailform envelope thing.

I guess mantis or ovh needed a valid mail adress to send all "Delivery failure" messages and stuff like that.

So i added:

$g_return_path_email = 'mantis@noreply.com';

And now it work like a charm.
Maybe this will help someone in future

atrol

atrol

2015-03-19 06:53

developer   ~0049271

fgmind,
thanks for coming back and telling the solution.

Does your posted script contain your real connection data for ssl0.ovh.net?
If so, I recommend to change your password.

The difference between your script and MantisBT is, that you did not set return path.
In this case PHPMailer uses the address of the username for the return path.

In MantisBT we set the return path to setting $g_return_path_email
The default value admin@example.com will be used if you don't set it yourself.

It seems that return path admin@example.com is a reason for ns0.ovh.net to deny sending the e-mail but not for smtp.gmail.com.

atrol

atrol

2015-03-19 06:55

developer   ~0049272

Reminder sent to: dregad, vboctor

Something that should be documented and/or checked in admin/check.php?

fgmind

fgmind

2015-03-19 08:50

reporter   ~0049273

For the moment it's just a test server, when i'll put it online i'll change password from azerty for sure! :)

I think it could be usefull to document this point, i had to do some researches before finding out the solution. It's not so obvious when you are not very familiar to email protocols and settings.

dregad

dregad

2015-03-19 10:05

developer   ~0049274

Something that should be documented and/or checked in admin/check.php?

I don't mind updating the documentation, but considering that this is specific to the SMTP server's settings, I don't think we can/should do something in admin checks.

atrol

atrol

2015-03-20 12:50

developer   ~0049281

I don't think we can/should do something in admin checks.

We did already in master
https://github.com/mantisbt/mantisbt/blob/master/admin/check/check_email_inc.php#L51