curl_howto

A curl command page

* send email by curl

curl -k -n --ssl-reqd --url "smtp://localhost:587" --mail-from stephanie@plop.org --mail-rcpt stephane@nethservertest.org --upload-file /dev/null -u 'stephane@domain.com':'PASSWORD' -v
curl -k -n --ssl-reqd --url "smtps://localhost:465" --mail-from stephanie@plop.org --mail-rcpt stephane@nethservertest.org --upload-file /dev/null -u 'stephane@domain.com':'PASSWORD' -v
[root@ns7loc14 ~]# curl smtp://192.168.56.11:25 -v --mail-from stephane@domain.org --mail-rcpt stephane@nethservetest.org <<EOF
Subject: Test toto
Date: $(date -R)
Message-ID: toto.$(date +%s)@$(hostname -d)
From: stephane@ndomain.org
To: stephane@nethservertest.org

Test toto
EOF
curl smtp://mail.domain.com:25 -v --anyauth --mail-from user@domain.com --mail-rcpt user@domain.com --upload-file ./fake_smime.eml

* test IMAP

curl -v imaps://user:password@domain.com