[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

problème de destinataire avec mutt



Bonjour,
J'ai un petit souci avec mutt. J'ai un script qui lance la commande suivante:
mutt -s "index" -moi@monserveur -a indexroot.csv -d 5

Quand je lance ce script en tant que root (nécessaire pour d'autre partie du script), tout fonctionne, le mail part bien et arrive, sachant que le mail ne reste pas en local, mais part via un FAI.

Si part contre la crontab exécute le script, le mail part sur root@myhostname et pas sur moi@monserveur ci dessous les log de mail et de mutt.

Jun 13 17:07:14 cantine postfix/pickup[21869]: A0397600A2: uid=0 from=<root>
Jun 13 17:07:14 cantine postfix/cleanup[25042]: A0397600A2: message-id=<20170613150714.A0397600A2@cantine Jun 13 17:07:14 cantine postfix/qmgr[29827]: A0397600A2: from=root@myhostname , size=1864, nrcpt=1 (queue active) Jun 13 17:07:15 cantine postfix/smtp[25044]: A0397600A2: to=root@myhostname , orig_to=<root>, relay=auth.smtp.1and1.fr[212.227.15.184]:25, delay=0.87, delays=0.08/0.01/\ 0.4/0.37, dsn=2.0.0, status=sent (250 Requested mail action okay, completed: id=0MRTkO-1dRHfX1APw-00ShXy)
Jun 13 17:07:15 cantine postfix/qmgr[29827]: A0397600A2: removed

[2017-06-13 17:07:14] Mutt/1.5.23 (2014-03-12) debugging at level 5
[2017-06-13 17:07:14] Reading configuration file '/etc/Muttrc'.
[2017-06-13 17:07:14] parse_attach_list: ldata = 0x814d674, *ldata = (nil)
[2017-06-13 17:07:14] parse_attach_list: added */.* [9]
[2017-06-13 17:07:14] parse_attach_list: ldata = 0x814d670, *ldata = (nil)
[2017-06-13 17:07:14] parse_attach_list: added text/x-vcard [7]
[2017-06-13 17:07:14] parse_attach_list: added application/pgp.* [2]
[2017-06-13 17:07:14] parse_attach_list: ldata = 0x814d670, *ldata = 0x945e4c8
[2017-06-13 17:07:14] parse_attach_list: skipping text/x-vcard
[2017-06-13 17:07:14] parse_attach_list: skipping application/pgp.*
[2017-06-13 17:07:14] parse_attach_list: added application/x-pkcs7-.* [2]
[2017-06-13 17:07:14] parse_attach_list: ldata = 0x814d66c, *ldata = (nil)
[2017-06-13 17:07:14] parse_attach_list: added text/plain [7]
[2017-06-13 17:07:14] parse_attach_list: ldata = 0x814d670, *ldata = 0x945e4c8
[2017-06-13 17:07:14] parse_attach_list: skipping text/x-vcard
[2017-06-13 17:07:14] parse_attach_list: skipping application/pgp.*
[2017-06-13 17:07:14] parse_attach_list: skipping application/x-pkcs7-.*
[2017-06-13 17:07:14] parse_attach_list: added message/external-body [4]
[2017-06-13 17:07:14] parse_attach_list: ldata = 0x814d668, *ldata = (nil)
[2017-06-13 17:07:14] parse_attach_list: added message/external-body [4]
[2017-06-13 17:07:14] Reading configuration file '/usr/lib/mutt/source-muttrc.d|'.
[2017-06-13 17:07:14] Reading configuration file '/etc/Muttrc.d/charset.rc'.
[2017-06-13 17:07:14] Reading configuration file '/etc/Muttrc.d/colors.rc'.
[2017-06-13 17:07:14] Reading configuration file '/etc/Muttrc.d/compressed-folders.rc'.
[2017-06-13 17:07:14] Reading configuration file '/etc/Muttrc.d/gpg.rc'.
[2017-06-13 17:07:14] Reading configuration file '/etc/Muttrc.d/smime.rc'.
[2017-06-13 17:07:14] Reading configuration file '/root/.muttrc'.
[2017-06-13 17:07:14] mutt_free_body: not unlinking indexroot.csv.

le fichier /root/.muttrc
# Adresse électronique de l'expéditeur
set from = "emetteur@serveur_emetteur "

# Nom complet de l'expéditeur
set realname = "mon vrai nom"

# Génération du champs from
set use_from = yes

et le /etc/Muttrc

# System configuration file for Mutt
#

# Default list of header fields to weed when displaying.
# Ignore all lines by default...
ignore *

# ... then allow these through.
unignore from: subject to cc date x-mailer x-url user-agent

set from = "emetteur@serveur_emetteur "

# Display the fields in this order
hdr_order date from to cc subject

# emacs-like bindings
bind editor "\e<delete>" kill-word
bind editor "\e<backspace>" kill-word

# map delete-char to a sane value
bind editor <delete> delete-char

# some people actually like these settings
#set pager_stop
#bind pager <up> previous-line
#bind pager <down> next-line

# Specifies how to sort messages in the index menu.
set sort=threads

# The behavior of this option on the Debian mutt package is
# not the original one because exim4, the default SMTP on Debian
# does not strip bcc headers so this can cause privacy problems;
# see man muttrc for more info
#unset write_bcc
# Postfix and qmail use Delivered-To for detecting loops
unset bounce_delivered

set mixmaster="mixmaster-filter"

# System-wide CA file managed by the ca-certificates package
set ssl_ca_certificates_file="/etc/ssl/certs/ca-certificates.crt"

# imitate the old search-body function
macro index \eb "<search>~b " "search in message bodies"

# simulate the old url menu
macro index,pager,attach,compose \cb "\
<enter-command> set my_pipe_decode=\$pipe_decode pipe_decode<Enter>\

 urlview<Enter>\
<enter-command> set pipe_decode=\$my_pipe_decode; unset my_pipe_decode<Enter>" \
"call urlview to extract URLs out of a message"

# Show documentation when pressing F1
macro generic,pager <F1> "<shell-escape> zcat /usr/share/doc/mutt/manual.txt.gz | sensible-pager<enter>" "show Mutt documentation"

# show the incoming mailboxes list (just like "mutt -y") and back when pressing "y" macro index,pager y "<change-folder>?<toggle-mailboxes>" "show incoming mailboxes list"
bind browser y exit

# If Mutt is unable to determine your site's domain name correctly, you can
# set the default here. (better: fix /etc/mailname)
#
set hostname=serveur_emetteur

# If your sendmail supports the -B8BITMIME flag, enable the following
#
# set use_8bitmime

# Use mime.types to look up handlers for application/octet-stream. Can
# be undone with unmime_lookup.
mime_lookup application/octet-stream

# Upgrade the progress counter every 250ms, good for mutt over SSH
# see http://bugs.debian.org/537746
set time_inc=250

##
## *** DEFAULT SETTINGS FOR THE ATTACHMENTS PATCH ***
##

##
## Please see the manual (section "attachments") for detailed
## documentation of the "attachments" command.
##
## Removing a pattern from a list removes that pattern literally. It
## does not remove any type matching the pattern.
##
## attachments +A */.*
## attachments +A image/jpeg
## unattachments +A */.*
##
## This leaves "attached" image/jpeg files on the allowed attachments
## list. It does not remove all items, as you might expect, because the
## second */.* is not a matching expression at this time.
##
## Remember: "unattachments" only undoes what "attachments" has done!
## It does not trigger any matching on actual messages.

## Qualify any MIME part with an "attachment" disposition, EXCEPT for
## text/x-vcard and application/pgp parts. (PGP parts are already known
## to mutt, and can be searched for with ~g, ~G, and ~k.)
##
## I've added x-pkcs7 to this, since it functions (for S/MIME)
## analogously to PGP signature attachments. S/MIME isn't supported
## in a stock mutt build, but we can still treat it specially here.
##
attachments +A */.*
attachments -A text/x-vcard application/pgp.*
attachments -A application/x-pkcs7-.*

## Discount all MIME parts with an "inline" disposition, unless they're
## text/plain. (Why inline a text/plain part unless it's external to the
## message flow?)
##
attachments +I text/plain

## These two lines make Mutt qualify MIME containers. (So, for example,
## a message/rfc822 forward will count as an attachment.) The first
## line is unnecessary if you already have "attach-allow */.*", of
## course. These are off by default! The MIME elements contained
## within a message/* or multipart/* are still examined, even if the
## containers themselves don't qualify.
##
#attachments +A message/.* multipart/.*
#attachments +I message/.* multipart/.*

## You probably don't really care to know about deleted attachments.

attachments -A message/external-body
attachments -I message/external-body

##
# See /usr/share/doc/mutt/README.Debian for details.
source /usr/lib/mutt/source-muttrc.d|


Merci d'avance pour les idées, je deviens chèvre :(


--

Benoit


Reply to: