Ситуация такова пишу скрипт на шеле!! нужно чтоб mail отправляла мне архив на почту)! как?
text
#!/bin/sh
cd /home/zag
tar --gzip -c -f lg_icq.tar.gz /var/log/imspector/ICQ-AIM
mail -s "lg_icq_##" ##@###.ru < /home/##/lg_icq.tar.gz
Ситуация такова пишу скрипт на шеле!! нужно чтоб mail отправляла мне архив на почту)! как?
#!/bin/sh
cd /home/zag
tar --gzip -c -f lg_icq.tar.gz /var/log/imspector/ICQ-AIM
mail -s "lg_icq_##" ##@###.ru < /home/##/lg_icq.tar.gz
Пользуй mutt.
man mutt
OPTIONS
-a file
Attach a file to your message using MIME.
а mail не может?
а mail не может?
может.
[console]echo "test" | mail drbatty@drbatty.ru[/console]
хотя в фряхе может и не сработать. Установите msmtp например...
[quote=zaG]а mail не может?
может.
[console]echo "test" | mail drbatty@drbatty.ru[/console]
хотя в фряхе может и не сработать. Установите msmtp например...[/quote]
не в тему ответ!!! мне файл нужно отправить!!!! как сообщение отправлять я знаю
не в тему ответ!!! мне файл нужно отправить!!!! как сообщение отправлять я знаю
приатачить?
MAILX(1) User Commands MAILX(1)
NAME
mailx - send and receive Internet mail
SYNOPSIS
mailx [-BDdEFintv~] [-s subject] [-a attachment ] [-c cc-addr] [-b bcc-addr] [-r from-addr] [-h hops]
[-A account] [-S variable[=value]] to-addr . . .
mailx [-BDdeEHiInNRv~] [-T name] [-A account] [-S variable[=value]] -f [name]
mailx [-BDdeEinNRv~] [-A account] [-S variable[=value]] [-u user]
DESCRIPTION
Mailx is an intelligent mail processing system, which has a command syntax reminiscent of ed(1) with lines
replaced by messages. It is based on Berkeley Mail 8.1, is intended to provide the functionality of the
POSIX mailx command, and offers extensions for MIME, IMAP, POP3, SMTP, and S/MIME. Mailx provides
enhanced features for interactive use, such as caching and disconnected operation for IMAP, message
threading, scoring, and filtering. It is also usable as a mail batch language, both for sending and
receiving mail.
The following options are accepted:
-A name
Executes an account command (see below) for name after the startup files have been read.
-a file
Attach the given file to the message.
в FreeBSD разве не так?
можно попробовать таким макаром:
gzip -c file.pdf | uuencode file.pdf.gz | mail -s "Test File" someuser@somedomain.com