Email Configuration Problems (Again)

Added by Paul Harris over 10 years ago

I have searched and searched for the answer to this, and so far to no avail.

I am running the latest 0.8 stable
Redmine 0.8.7.stable.3285 (Against rails 2.1.2.)

I have configured config/email.yml

# Outgoing email settings

production:
  delivery_method: :smtp
  address: 10.4.1.102
  port: 25
  domain: [mydomain.co.uk]
  authentication: :none

I have configured my own email address correctly.

When I send a test email, I get "An error occurred while sending mail (end of file reached)".

I have been googling this for hours and cannot seem to find a solution.

I have a working config on a redmine 0.7 release

config.action_mailer.smtp_setting = {
     :address => "10.4.1.102",
     :port => 25
}

Replies (9)

RE: Email Configuration Problems (Again) - Added by Paul Harris over 10 years ago

If anyone out there has any ideas, I'd appreciate it. I am meant to be demo'ing this system tomorrow.

I see someone else has had exactly the same issue here...
[[http://www.redmine.org/boards/2/topics/9060]]

RE: Email Configuration Problems (Again) - Added by Ramesh kumar over 10 years ago

Hi,

I too have some problem in email configuration

production:
delivery_method: :smtp
smtp_settings:
address: smtp.mydomain.com
port: 25
domain: mydomain.com
authentication: :login
user_name: test@mydomain.com
password: xoih

My problem is after configuring it in config/email.yml, I tried to restart the redmine application. But I cant restart the application. I renamed email.yml file and started the rail application then the Rail application starts to work fine.

What would be the issue? If I configure mail then the problem arises.

RE: Email Configuration Problems (Again) - Added by Paul Harris over 10 years ago

I really don't know. The only thing that seems obvious to me, is that your user_name might want to be

user_name: test

not

user:name:

This file should also be all plain text, containing spaces only, no tabs.

RE: Email Configuration Problems (Again) - Added by Ramesh kumar over 10 years ago

Ramesh kumar wrote:

Hi,

I too have some problem in email configuration

production:
delivery_method: :smtp
smtp_settings:
address: smtp.mydomain.com
port: 25
domain: mydomain.com
authentication: :login
user_name: test@mydomain.com
password: test

My problem is after configuring it in config/email.yml, I tried to restart the redmine application. But I cant restart the application. I renamed email.yml file and started the rail application then the Rail application starts to work fine.

What would be the issue? If I configure mail then the problem arises.

RE: Email Configuration Problems (Again) - Added by Ramesh kumar over 10 years ago

Thanks, I have made the changes, I have changed the user_name to test instead of but still I face the same issue.

RE: Email Configuration Problems (Again) - Added by Paul Harris over 10 years ago

Okay, I have a working solution now.

I had to work through the solution with our exchange admin. We tried various combinations of settings.

I wish I could specify the change that worked. I took all of the spaces our of email.yml - just to check a) for tabs and b) to see if the key/value data was affected by spaces. The app started okay but gave me a different error (HELO must specify host), so I put the spaces back in again and voila, it works.

Now I had already checked for tabs, I was using pico for editing.

The only issue is, our exchange admin was also fiddling at his end, so I cannot guarantee that my actions caused a resolution. I ended up commenting out the username and password, setting auth to :none, and getting him to make changes to the relay config.

My final email.yml file looks

# Outgoing email settings

production:
  delivery_method: :smtp
  smtp_settings:
    address: 102.168.6.223
    port: 25
    domain: [mydomain.co.uk]
    authentication: :none
    #user_name: RMTest
    #password: [mypassword]

RE: Email Configuration Problems (Again) - Added by Jarosław Krzemieński about 10 years ago

Has someone solved this problem? I am frustrated - I can't send mails and I can't make open relay for my mail server :/ oO

RE: Email Configuration Problems (Again) - Added by Jarauta Jarauta about 9 years ago

I'm having different problems
If I write
production:
delivery_method: :smtp
smtp_settings:
address: IP
port: 25
domain: "mydomain"
authentication: :none
The error is: "An error occurred while sending mail (end of file reached)"

If I write
production:
delivery_method: :smtp
smtp_settings:
address: IP
port: 25
domain: "mydomain"
authentication: :login
user_name: "User"
password: "mypassword"
The error is: "504 5.7.4 Unrecognized authentication type"

If I write
production:
delivery_method: :smtp
smtp_settings:
address: IP
port: 25
tls: false
ssl: true
enable_startttl_auto: true
domain: "mydomain"
authentication: :login
user_name: "User"
password: "mypassword"
The error is: "hostname was not match with the server certificate"

Is there any solution?. I'm with redmine 1.1.2
Thanks

RE: Email Configuration Problems (Again) - Added by Adrienne Millican over 7 years ago

I had this same Redmine error -- "An error occurred while sending mail (end of file reached)". I know, it's a very confusing and misleading error message. Spent several days trying to fix it.

The way I finally ended up figuring out the actual nature of the problem was to look at the mail server's error file. It turned out to be a problem with the SASL configuration.

Check error logs for both your mail server and your Web server. In my case, checking /var/log/mail.err yielded this much more informative error: "fatal: no SASL authentication mechanisms"

I had to alter the etc/postfix/main.cf file to include the following (used Dovecot, btw):

smtpd_sasl_auth_enable = yes
smtpd_sasl_type = dovecot
smtpd_sasl_path = private/auth
smtpd_recipient_restrictions = permit_mynetworks,permit_sasl_authenticated,reject_unauth_destination
smtpd_sasl_security_options = noanonymous
broken_ssl_auth_clients = yes
smtpd_use_tls = no
smtpd_sasl_tls_security_options = $smtpd_sasl_security_options
smtpd_sasl_local_domain = xxx.mydomainname.com

(1-9/9)