ITS-Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    Ubuntu Cron Mails versenden

    Scheduled Pinned Locked Moved IT-Stuff
    1 Posts 1 Posters 518 Views 1 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • A Offline
      admin
      last edited by admin

      Mit ssmtp kann man einfach den Mailersand auch zB über google Mail realisieren, einfach mit folgendem Befehl installieren:

      apt install ssmtp
      

      Dann in der Config /etc/ssmtp/ssmtp.conf folgendes konfigurieren:

      # Config file for sSMTP sendmail
      #
      # The person who gets all mail for userids < 1000
      # Make this empty to disable rewriting.
      root=USER@gmail.com
      
      # The place where the mail goes. The actual machine name is required no
      # MX records are consulted. Commonly mailhosts are named mail.domain.com
      mailhub=smtp.gmail.com:587
      
      # Where will the mail seem to come from?
      rewriteDomain=gmail.com
      
      # The full hostname
      hostname=USER@gmail.com
      
      # Are users allowed to set their own From: address?
      # YES - Allow the user to specify their own From: address
      # NO - Use the system generated From: address
      FromLineOverride=YES
      
      AuthUser=MYUSER
      AuthPass=MYPASSWORD
      UseSTARTTLS=YES
      

      Danach müssen wir die konten noch zuweisen in /etc/ssmtp/revaliases

      # sSMTP aliases
      #
      # Format:       local_account:outgoing_address:mailhub
      #
      # Example: root:your_login@your.domain:mailhub.your.domain[:port]
      # where [:port] is an optional port number that defaults to 25.
      root:USER@gmail.com:smtp.gmail.com:587
      www-data:USER@gmail.com:smtp.gmail.com:587
      
      1 Reply Last reply Reply Quote 0

      Hello! It looks like you're interested in this conversation, but you don't have an account yet.

      Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

      With your input, this post could be even better 💗

      Register Login
      • First post
        Last post
      Powered by NodeBB | Contributors