Issue Creation Assistance needed -- RESOLVED
Added by thomas moretto about 11 years ago
I followed the wiki article (http://www.redmine.org/projects/redmine/wiki/RedmineReceivingEmails#Forwarding-emails-from-your-email-server) but am having problems sending mail to my alias.
Each time I test from command line, I receive "(stat failed)" inside my maillog.
I enabled Incoming Email inside application settings and generated a key.
Permissions on rdm-mailhandler.rb:
-rwxr-xr-x. 1 apache apache 7.5K Oct 22 15:23 rdm-mailhandler.rb
My /etc/aliases entry:
redmine: "|/opt/redmine/extra/mail_handler/rdm-mailhandler.rb --url http://redmine01.company.com --key generatedfrominsideredmine"
I am using this to test from command line
echo TEST | mail -s "TEST" redmine@redmine.company.com
/var/log/maillog snip
Jan 31 13:08:13 redmine smrsh: uid 8: attempt to use "rdm-mailhandler.rb --url redmine01.company.com --key generatedfrominsideredmine" (stat failed)
Jan 31 13:08:13 redmine sendmail[26512]: s0VI8DBR026511: to="|/opt/redmine01/extra/mail_handler/rdm-mailhandler.rb --url redmine01.company.com --key generatedfrominsideredmine", ctladdr=<redmine@localhost.localdomain> (8/0), delay=00:00:00, xdelay=00:00:00, mailer=prog, pri=30732, dsn=5.0.0, stat=Service unavailable
Jan 31 13:08:13 redmine sendmail[26512]: s0VI8DBR026511: s0VI8DBR026512: DSN: Service unavailable
Jan 31 13:08:13 redmine sendmail[26512]: s0VI8DBR026512: to=<root@localhost.localdomain>, delay=00:00:00, xdelay=00:00:00, mailer=local, pri=31756, dsn=2.0.0, stat=Sent
Replies (2)
RE: Issue Creation Assistance needed
-
Added by thomas moretto about 11 years ago
I got that issue solved by changing ownership and allowing permissions on rdm-mailhandler.rb file. Now my problem is listed below. I'm not sure what file the insufficient permissions is referring to.
Feb 3 09:09:12 redmine sendmail[6435]: s13E9Brt006435: from=root, size=224, class=0, nrcpts=1, msgid=<201402031409.s13E9Brt006435@localhost.localdomain>, relay=root@localhost
Feb 3 09:09:12 redmine sendmail[6436]: alias database /etc/aliases.db out of date
Feb 3 09:09:12 redmine sendmail[6436]: s13E9Ch6006436: from=<root@localhost.localdomain>, size=492, class=0, nrcpts=1, msgid=<201402031409.s13E9Brt006435@localhost.localdomain>, proto=ESMTP, daemon=MTA, relay=localhost.localdomain [127.0.0.1]
Feb 3 09:09:12 redmine sendmail[6435]: s13E9Brt006435: to=user@redmine.company.com, ctladdr=root (0/0), delay=00:00:01, xdelay=00:00:00, mailer=relay, pri=30224, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (s13E9Ch6006436 Message accepted for delivery)
Feb 3 09:09:12 redmine sendmail[6437]: alias database /etc/aliases.db out of date
Feb 3 09:09:12 redmine sendmail[6437]: s13E9Ch6006436: to="|/etc/smrsh/rdm-mailhandler --url http://redmine01.company.com --key generatedfrominsideredmine --project=projectname", ctladdr=<mattl@localhost.localdomain> (8/0), delay=00:00:00, xdelay=00:00:00, mailer=prog, pri=30725, dsn=5.0.0, stat=Insufficient permission
Feb 3 09:09:12 redmine sendmail[6437]: s13E9Ch6006436: s13E9Ch6006437: DSN: Insufficient permission
Feb 3 09:09:12 redmine sendmail[6437]: s13E9Ch6006437: to=<root@localhost.localdomain>, delay=00:00:00, xdelay=00:00:00, mailer=local, pri=31749, dsn=2.0.0, stat=Sent
here is the permission list on the mailhandler file:
file: opt/redmine01/extra/mail_handler/rdm-mailhandler.rb
owner: root
group: mail
user::rwx
user:mail:rwx
user:apache:rwx
group::r-x
mask::rwx
other::r-x
RE: Issue Creation Assistance needed
-
Added by thomas moretto about 11 years ago
Problem resolved.
There was an extra option I had to attach to the alias entry (--unkown-user=allow)