Jump to content

Recommended Posts

Posted

Хочу скриптом на линуксе отправлять по почте некоторые файлы.

Но хочу отправлять не от своей основной учетки, а использовать отдельный почтовый аккаунт (на GMail).

Для этого в mailutils есть ключ --config-file. Но не могу понять его синтаксис.

Точнее, синтаксис вроде бы должен быть такой: https://mailutils.org/manual/mailutils.html#configuration

Но он у меня никак не принимается.

В идеале я бы хотел перенести в конфигурационный файл следующие ключи mailx:

-S smtp="smtp.gmail.com:465"
-S smtp-use-starttls
-S smtp-auth=login
-S smtp-auth-user="...@gmail.com"
-S smtp-auth-password="..."
-S ssl-verify=ignore
-S from=...@gmail.com

(заморочки GMail с паролем-токеном для приложений выполнены, с этими параметрами другой скрипт на Perl у меня работает)

 

Не подскажете, где почитать про синтаксис?

Posted

Тут же по ссылке все есть:
 

Цитата

the --config-file command line option instructs the program to read configuration from the file supplied as its argument. In that case, default configuration files are not used at all.

 

It is named sysconfdir/mailutils.conf, where sysconfdir stands for the system configuration directory set when compiling the package. You can obtain the value of sysconfdir by running

$ mailutils info sysconfdir
or

$ prog --show-config-options | grep SYSCONFDIR
where prog stands for any GNU Mailutils utility.

 

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...
На сайте используются файлы cookie и сервисы аналитики для корректной работы форума и улучшения качества обслуживания. Продолжая использовать сайт, вы соглашаетесь с использованием файлов cookie и с Политикой конфиденциальности.