Edgewall Software
Modify

Opened 14 years ago

Closed 13 years ago

#10220 closed defect (worksforme)

"mail -f" is not working in notifications

Reported by: team@… Owned by:
Priority: normal Milestone:
Component: general Version: 0.13dev
Severity: normal Keywords: documentation
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

Description

It's Ubuntu 10.10. I installed sendmail and mail with apt-get install mailutils. This is a part of my trac.ini:

[notification]
email_sender = SendmailEmailSender
sendmail_path = /usr/bin/mail

This is what Trac 0.13dev-r10708 is saying:

Warning: The change has been saved, but an error occurred while 
sending notifications: Sendmail failed with (64, mail: -f requires at 
most one command line argument Try `mail --help' or `mail --usage' 
for more information.), command: '[u'/usr/bin/mail', '-i', '-f', 
u'trac@xxx', u'xxx@yahoo.com']'

What is it about and how can I fix it?

Attachments (0)

Change History (5)

comment:1 by team@…, 14 years ago

This is what mail --help is saying:

$ mail --help
Usage: mail [OPTION...] [address...]
  or:  mail [OPTION...] -f [OPTION...] [file]
  or:  mail [OPTION...] --file [OPTION...] [file]
  or:  mail [OPTION...] --file=file [OPTION...]
GNU mail -- process mail messages
If -f or --file is given, mail operates on the mailbox named by the first
argument, or the user's mbox, if no argument given.

  -a, --append=HEADER: VALUE append given header to the message being sent
  -e, --exist                return true if mail exists
  -E, --exec=COMMAND         execute COMMAND
  -F, --byname               save messages according to sender
  -H, --headers              write a header summary and exit
  -i, --ignore               ignore interrupts
  -n, --norc                 do not read the system mailrc file
  -N, --nosum                do not display initial header summary
  -p, -r, --print, --read    print all mail to standard output
  -q, --quit                 cause interrupts to terminate program
  -s, --subject=SUBJ         send a message with the given SUBJECT
  -t, --to                   precede message by a list of addresses
  -u, --user=USER            operate on USER's mailbox
      --tls[=BOOL]           enable TLS support

 Common options
      --config-file=FILE, --rcfile=FILE
                             load this configuration file
      --config-help          show configuration file summary
      --config-lint, --rcfile-lint
                             check configuration file syntax and exit
      --config-verbose, --rcfile-verbose
                             verbosely log parsing of the configuration files
      --no-site-config, --no-site-rcfile
                             do not load site configuration file
      --no-user-config, --no-user-rcfile
                             do not load user configuration file
      --show-config-options  show compilation options


 Global debugging settings
      --debug-level=LEVEL    set Mailutils debugging level
      --debug-line-info      show source info with debugging messages

      --license              print license and exit

  -?, --help                 give this help list
      --usage                give a short usage message
  -V, --version              print program version

Mandatory or optional arguments to long options are also mandatory or optional
for any corresponding short options.

Report bugs to <bug-mailutils@gnu.org>.

comment:2 by team@…, 14 years ago

Looks like the right configuration is:

[notification]
email_sender = SendmailEmailSender
sendmail_path = /usr/sbin/sendmail

Maybe we should add some hint to documentation? To avoid such questions in the future.

in reply to:  2 comment:3 by Remy Blank, 14 years ago

Keywords: documentation added

Replying to team@…:

Maybe we should add some hint to documentation? To avoid such questions in the future.

I would have thought that the name of the option (sendmail_path) is explicit enough, but feel free to edit the documentation as you see fit.

Last edited 14 years ago by Remy Blank (previous) (diff)

in reply to:  2 comment:4 by psuter <petsuter@…>, 14 years ago

Replying to team@…:

Maybe we should add some hint to documentation? To avoid such questions in the future.

Did you see TracNotification#ExampleConfigurationsendmail?

comment:5 by Christian Boos, 13 years ago

Resolution: worksforme
Status: newclosed

Seems the documentation is clear enough.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The ticket will remain with no owner.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from (none) to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.