LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 10-19-2023, 07:37 AM   #31
Pedroski
Senior Member
 
Registered: Jan 2002
Location: Nanjing, China
Distribution: Ubuntu 20.04
Posts: 2,116

Original Poster
Rep: Reputation: 73

@bathory: the following is the part of the content of sudo nano /etc/cloud/cloud.cfg


Quote:
[
# System and/or distro specific settings
# (not accessible to handlers/transforms)
system_info:
# This will affect which distro class gets used
distro: ubuntu
# Default user name + that default users groups (if added/used)
default_user:
name: ubuntu
lock_passwd: True
gecos: Ubuntu
groups: [adm, audio, cdrom, dialout, dip, floppy, lxd, netdev, plugdev, sudo, video]
sudo: ["ALL=(ALL) NOPASSWD:ALL"]
shell: /bin/bash
network:
renderers: ['netplan', 'eni', 'sysconfig']
activators: ['netplan', 'eni', 'network-manager', 'networkd']
# Automatically discover the best ntp_client
ntp_client: auto
# Other config here will be given to the distro class and/or path classes
paths:
cloud_dir: /var/lib/cloud/
templates_dir: /etc/cloud/templates/
package_mirrors:
- arches: [i386, amd64]
failsafe:
primary: http://archive.ubuntu.com/ubuntu
security: http://security.ubuntu.com/ubuntu
search:
primary:
- http://%(ec2_region)s.ec2.archive.ubuntu.com/ubuntu/
- http://%(availability_zone)s.clouds....tu.com/ubuntu/
- http://%(region)s.clouds.archive.ubuntu.com/ubuntu/

Looks like I could set the default user as me, pedro, but I can't see how to set the domain name as mywebpage.com

Any tips please?
 
Old 10-19-2023, 08:14 AM   #32
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,173
Blog Entries: 1

Rep: Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040
Quote:
Looks like I could set the default user as me, pedro, but I can't see how to set the domain name as mywebpage.com
D'oh the /etc/cloud/cloud.cfg is different from the one mentioned here.
Anyway, you can use the other option mentioned in the hosts file, i.e. edit /etc/cloud/templates/hosts.debian.tmpl and add there the entries you want:
Code:
195.20.254.33 www.mywebpage mywebpage.com
127.0.0.1 www.mywebpage mywebpage.com localhost localhost.localdomain
 
Old 10-19-2023, 01:56 PM   #33
HytronBG
LQ Newbie
 
Registered: Oct 2023
Posts: 10

Rep: Reputation: 0
Quote:
Originally Posted by Pedroski View Post
@HytronBG



I attach a picture of some of the settings for my domain at IONOS. Is that the TXT setting you mean?
The TXT is a DNS record that exists for a domain. For example you can use domain that I use for testing all the time (I hope these guys dont hate me for posting this here) is ackits.com

If you do:

# nslookup -q=TXT ackits.com

you will received:

Non-authoritative answer:
ackits.com text = "google-site-verification=oBOD4LuXiwm0yG6_6juHNtNnIGUhzC1
XUO4a6D1qGvE"
ackits.com text = "v=spf1 +ip4:173.231.204.196 +ip4:173.231.229.11 +ip4:209
.182.203.65 +mx +a +include:_spf.google.com ~all"


What this means is that only 173.231.204.196, 173.231.229.11 and 209.182.203.65 are allowed to be sending email on behalf of the domain ackits.com. Most providers like gmail.com or other giants check for the TXT spf records before they accept email.

Last edited by HytronBG; 10-19-2023 at 01:57 PM.
 
Old 10-20-2023, 01:13 AM   #34
Pedroski
Senior Member
 
Registered: Jan 2002
Location: Nanjing, China
Distribution: Ubuntu 20.04
Posts: 2,116

Original Poster
Rep: Reputation: 73
@bathory

Do I need to change the default user in /etc/cloud/cloud.cfg??

Quote:
# System and/or distro specific settings
# (not accessible to handlers/transforms)
system_info:
# This will affect which distro class gets used
distro: ubuntu
# Default user name + that default users groups (if added/used)
default_user:
name: ubuntu
lock_passwd: True
gecos: Ubuntu
groups: [adm, audio, cdrom, dialout, dip, floppy, lxd, netdev, plugdev, sudo, video]
sudo: ["ALL=(ALL) NOPASSWD:ALL"]
shell: /bin/bash
@HytronBG

What should I put in TXT??


At the moment there are 2 TXT entries, you can see them in the picture I attached. The lower one is:

Quote:
TXT @ "v=spf1 include: spf-eu.ionos.com + ip4: ~all" MAIL

I think I should put this in the VALUE column if my ip4 address is 123.456.789.123

Quote:
"v=spf1 include:_spf-eu.ionos.com + ip4:123.456.789.123 ~all"
 
Old 10-20-2023, 03:55 AM   #35
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,173
Blog Entries: 1

Rep: Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040
Quote:
Do I need to change the default user in /etc/cloud/cloud.cfg??
No you don't. There is already a default user (ubuntu) and it's not relevant to the mail system

If you have setup the hostname, masquerading, relaying etc, you can try to send an email from CLI to your gmail.com or qq.com account and watch the logs to see what happens:
Code:
mail -s Test you@gmail.com < /dev/null
 
Old 10-21-2023, 01:47 AM   #36
Pedroski
Senior Member
 
Registered: Jan 2002
Location: Nanjing, China
Distribution: Ubuntu 20.04
Posts: 2,116

Original Poster
Rep: Reputation: 73
Thanks again for the tips and advice.

At the moment, I can't seem to get it working. I will read all the tutorials again and try again! At the moment I am trying to get ssl working!

For now, I have changed the contact page: php saves the details from the contact page as a text file in a folder called messages on the cloud server.

I can fetch the messages with a bash script using rsync and save them on this computer. That works fine!
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to set DJ and DS in sendmail.mc rather than sendmail.cf manually anon091 Linux - Software 7 09-02-2014 02:09 PM
Sendmail Sendmail Sendmail lmcilwain Fedora 0 02-14-2006 02:01 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 07:28 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration