Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    Script for Email with attachment

    Scheduled Pinned Locked Moved General pfSense Questions
    1 Posts 1 Posters 524 Views
    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.
    • I
      imadnyx
      last edited by

      Hello
      I recently started using pfsense and I am trying to get a script I used under IPFire to work with pfsense. the problem I have is that I can not find a way to get my script to attache a log file. with ipfire there was a SendEmail daemon that I used but I cant find a way to attache a file using mail.php. Can you anyone help please I need to modify  to to work with pfsens..

      here is my script.

      #!/bin/sh

      grep -e "word1" -e "word2"  /var/squid/logs/access.log  > /home/scripts/poxlog.txt;
        /usr/local/bin/sendEmail -f XXXXXXX@gmail.com -t XXXXXXX@gmail.com -u "P-Logs" -m " Attached log file " -s smtp.gmail.com:587 -xu XXXXXXX -xp XXXXXXX  -o tls=yes -a /home/scripts/poxlog.txt;

      Thanks
      i

      1 Reply Last reply Reply Quote 0
      • First post
        Last post
      Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.