View previous topic :: View next topic |
Author |
Message |
cewlout n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 18 Jul 2004 Posts: 45
|
Posted: Sun Jun 12, 2005 2:44 pm Post subject: Email in consolenebene |
|
|
Hallo Leute,
habe mal eine Frage bezüglich email in der Konsole. Ich habe hier nen Server, der alle zwei Wochen per cron automatisch ein sync macht und danach ein skript laufen lässt, dass ausgibt für welche ebuilds ein Update zur Verfügung steht und in ein log speichert.
Jetzt log ich mich alle zwei Wochen ein und schau mir das logfile an und entscheide dann, was ich updaten will und was nicht etc..
Jetzt wäre es eine feine Sache, wenn mir dieses logfile nach Ablauf des Cronjobs einfach zu meinem EMailaccount senden würde (das ist aber ein Mailaccount, der nicht lokal irgendwie auf dem Server ist etc..)
Weiss jemand wie ich soetwas bewerkstelligen kann?
Nett wäre ein Programm, dass man per console starten kann und emails lossenden, es geht mir dabei eben rein um das Senden an meine "richtige" emailadresse, ich brauche da keinen "komplizierten" Client oder so.
Was muss ich installieren, wenn ich so eine funktionalität haben möchte?
Danke für euren Rat!
Grüße,
co |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
psyqil Advocate
![Advocate Advocate](/images/ranks/rank-G-1-advocate.gif)
![](images/avatars/1587989655463dcd544a602.jpg)
Joined: 26 May 2003 Posts: 2767
|
Posted: Sun Jun 12, 2005 2:48 pm Post subject: |
|
|
mail-mta/ssmtp müßtest Du schon haben, sonst ist mail-client/mailx auch gut für sowas. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
think4urs11 Bodhisattva
![Bodhisattva Bodhisattva](/images/ranks/rank-bodhisattva.gif)
![](images/avatars/8534934054bad29b51e5fa.jpg)
Joined: 25 Jun 2003 Posts: 6659 Location: above the cloud
|
Posted: Sun Jun 12, 2005 7:03 pm Post subject: |
|
|
net-mail/sendEmail wäre evtl. auch noch eine Alternative. _________________ Nothing is secure / Security is always a trade-off with usability / Do not assume anything / Trust no-one, nothing / Paranoia is your friend / Think for yourself |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Anarcho Advocate
![Advocate Advocate](/images/ranks/rank-G-1-advocate.gif)
![](images/avatars/1030393113423afb9086043.jpg)
Joined: 06 Jun 2004 Posts: 2970 Location: Germany
|
Posted: Mon Jun 13, 2005 6:14 am Post subject: |
|
|
Wenn das ganze von Cron aufgerufen wird, lass das Script doch einfach die Ausgabe noch parallel an stdout ausgeben. Dann mailt dir Cron das automatisch zu. Musst nur ne Email-adresse im Crontab angeben, etwa so:
einfach in die erste Zeile der Crontab eintragen:
MAILTO="blah@blubb.de"
Natürlich muss dann auch ein MTA installiert sein (siehe oben) _________________ ...it's only Rock'n'Roll, but I like it! |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
slick Bodhisattva
![Bodhisattva Bodhisattva](/images/ranks/rank-bodhisattva.gif)
![](images/avatars/155298905545589d9986ab5.gif)
Joined: 20 Apr 2003 Posts: 3495
|
Posted: Mon Jun 13, 2005 7:07 am Post subject: |
|
|
Ich mach sowas mit mutt
Code: | cat /path/logfile | mutt -x foo@example.com -s "Logfile `date`" |
oder
Code: | mutt -x foo@example.com -s "Logfile `date`" -x /path/logfile |
Als MTA habe ich Postfix laufen ... |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
think4urs11 Bodhisattva
![Bodhisattva Bodhisattva](/images/ranks/rank-bodhisattva.gif)
![](images/avatars/8534934054bad29b51e5fa.jpg)
Joined: 25 Jun 2003 Posts: 6659 Location: above the cloud
|
Posted: Mon Jun 13, 2005 7:29 am Post subject: |
|
|
sendEmail benötigt z.B. keinerlei MTA oder sonstige Voraussetzungen (außer einem Perl Interpreter) _________________ Nothing is secure / Security is always a trade-off with usability / Do not assume anything / Trust no-one, nothing / Paranoia is your friend / Think for yourself |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Anarcho Advocate
![Advocate Advocate](/images/ranks/rank-G-1-advocate.gif)
![](images/avatars/1030393113423afb9086043.jpg)
Joined: 06 Jun 2004 Posts: 2970 Location: Germany
|
Posted: Mon Jun 13, 2005 7:41 am Post subject: |
|
|
Verschickt sendEmail über einen SMTP-Server? _________________ ...it's only Rock'n'Roll, but I like it! |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
think4urs11 Bodhisattva
![Bodhisattva Bodhisattva](/images/ranks/rank-bodhisattva.gif)
![](images/avatars/8534934054bad29b51e5fa.jpg)
Joined: 25 Jun 2003 Posts: 6659 Location: above the cloud
|
Posted: Mon Jun 13, 2005 7:51 am Post subject: |
|
|
Jepp
Quote: | About SendEmail
SendEmail is a lightweight, completly command line based, SMTP email agent. If you have the need to send email from a command prompt this tool is perfect. It was designed to be used in bash scripts, Perl programs, and web sites, but it is also quite useful in many other contexts. SendEmail is written in Perl and is unique in that it requires NO SPECIAL MODULES. It has a straight forward interface, making it very easy to use.
[This also works on Win32] |
Als SMTP-Server kann jeder beliebige SMTP angegeben werden, ggf. mit Authentifizierung. _________________ Nothing is secure / Security is always a trade-off with usability / Do not assume anything / Trust no-one, nothing / Paranoia is your friend / Think for yourself |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
cewlout n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 18 Jul 2004 Posts: 45
|
Posted: Mon Jun 13, 2005 8:22 am Post subject: |
|
|
Danke Leute für die Hilfe,
jetzt habe ich's per ssmtp und sendEmail hinbekommen und jetzt kann ich mich nicht entscheiden, was ich letztlich benutzen soll haha . SCNR.
Im Ernst, funzt jetzt einwandfrei, danke wie immer!
Grüße |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
|